summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRuslan Teliuk <ruslantproductengine@lindenlab.com>2019-10-22 20:02:46 +0000
committerRuslan Teliuk <ruslantproductengine@lindenlab.com>2019-10-22 20:02:46 +0000
commit05a3ea99765c767f74bf4ceac3bca39a326be4bf (patch)
treec8340b5605f6a21f9e473434607d1078e52d0fca /indra/newview
parent6f4692bac2736bc38828911a52e657df6fa13a07 (diff)
parent2b8acfea0e29fd4604fc7ed677b4bfc01d10252f (diff)
Merged in ruslantproductengine/viewer-cougar-4cr-3 (pull request #65)
SL-11840 [Bakes on Mesh] Enable bake textures to be applied to non-attached editable items Approved-by: Andrey Lihatskiy <andreylproductengine@lindenlab.com> Approved-by: Simon Linden <simon@lindenlab.com>
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelface.cpp33
-rw-r--r--indra/newview/lltexturectrl.cpp8
-rw-r--r--indra/newview/lltexturectrl.h1
3 files changed, 6 insertions, 36 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index c686aab821..2d300ecf9f 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -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);
}
}
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 8a2fc881a9..2f94d59217 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -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)
{
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index b2a34a37c4..06e8101177 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -239,7 +239,6 @@ private:
BOOL mShowLoadingPlaceholder;
std::string mLoadingPlaceholderString;
S32 mLabelWidth;
- BOOL mBakeTextureEnabled;
};
//////////////////////////////////////////////////////////////////////////////////////////