SL-11840 [Bakes on Mesh] Enable bake textures to be applied to non-attached editable items

- Now bake texture channel's available for assign for non attached objects
meow-7.2.2
ruslantproductengine 2019-10-18 22:38:33 +03:00
parent 2ec0ccb628
commit 2b8acfea0e
3 changed files with 6 additions and 36 deletions

View File

@ -1027,21 +1027,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha);
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha);
bool allAttachments = true;
for (LLObjectSelection::iterator iter = LLSelectMgr::getInstance()->getSelection()->begin();
iter != LLSelectMgr::getInstance()->getSelection()->end();iter++)
{
LLSelectNode* node = *iter;
LLViewerObject* object = node->getObject();
if (!object->isAttachment())
{
allAttachments = false;
break;
}
}
texture_ctrl->setBakeTextureEnabled(allAttachments);
texture_ctrl->setBakeTextureEnabled(TRUE);
}
else if (id.isNull())
{
@ -1066,21 +1052,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
getChildView("label alphamode")->setEnabled(editable && mIsAlpha);
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha);
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha);
bool allAttachments = true;
for (LLObjectSelection::iterator iter = LLSelectMgr::getInstance()->getSelection()->begin();
iter != LLSelectMgr::getInstance()->getSelection()->end();iter++)
{
LLSelectNode* node = *iter;
LLViewerObject* object = node->getObject();
if (!object->isAttachment())
{
allAttachments = false;
break;
}
}
texture_ctrl->setBakeTextureEnabled(allAttachments);
texture_ctrl->setBakeTextureEnabled(TRUE);
}
}

View File

@ -435,7 +435,7 @@ BOOL LLFloaterTexturePicker::postBuild()
getChild<LLComboBox>("l_bake_use_texture_combo_box")->setCommitCallback(onBakeTextureSelect, this);
getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setCommitCallback(onHideBaseMeshRegionCheck, this);
setBakeTextureEnabled(FALSE);
setBakeTextureEnabled(TRUE);
return TRUE;
}
@ -1211,8 +1211,7 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
mImageAssetID(p.image_id),
mDefaultImageAssetID(p.default_image_id),
mDefaultImageName(p.default_image_name),
mFallbackImage(p.fallback_image),
mBakeTextureEnabled(FALSE)
mFallbackImage(p.fallback_image)
{
// Default of defaults is white image for diff tex
@ -1405,7 +1404,7 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
}
if (texture_floaterp)
{
texture_floaterp->setBakeTextureEnabled(mBakeTextureEnabled);
texture_floaterp->setBakeTextureEnabled(TRUE);
}
LLFloater* root_floater = gFloaterView->getParentFloater(this);
@ -1584,7 +1583,6 @@ void LLTextureCtrl::setImageAssetID( const LLUUID& asset_id )
void LLTextureCtrl::setBakeTextureEnabled(BOOL enabled)
{
mBakeTextureEnabled = enabled;
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
if (floaterp)
{

View File

@ -239,7 +239,6 @@ private:
BOOL mShowLoadingPlaceholder;
std::string mLoadingPlaceholderString;
S32 mLabelWidth;
BOOL mBakeTextureEnabled;
};
//////////////////////////////////////////////////////////////////////////////////////////