diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-06-23 19:51:11 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-06-24 08:36:50 +0300 |
commit | 0bc7fee11fe43281d5d3c97e95249f9c26af0eb1 (patch) | |
tree | 0c48f6008806f4865fff8b84d8afb25e0f40fb42 /indra/newview/lltexturectrl.cpp | |
parent | 088ddc28a4954f8e10627deec951a51fda8cb31d (diff) |
SL-17640 Materials Upload UI #1
1. Allow 'none' textures
2. Disable 'apply now' buttons
3. Switch from loading dae files to just gltf glb
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 1c4a56b549..b761f34790 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -193,10 +193,8 @@ void LLFloaterTexturePicker::setActive( BOOL active ) void LLFloaterTexturePicker::setCanApplyImmediately(BOOL b) { mCanApplyImmediately = b; - if (!mCanApplyImmediately) - { - getChild<LLUICtrl>("apply_immediate_check")->setValue(FALSE); - } + + getChild<LLUICtrl>("apply_immediate_check")->setValue(mCanApplyImmediately); updateFilterPermMask(); } @@ -413,11 +411,7 @@ BOOL LLFloaterTexturePicker::postBuild() getChild<LLUICtrl>("apply_immediate_check")->setValue(gSavedSettings.getBOOL("TextureLivePreview")); childSetCommitCallback("apply_immediate_check", onApplyImmediateCheck, this); - - if (!mCanApplyImmediately) - { - getChildView("show_folders_check")->setEnabled(FALSE); - } + getChildView("apply_immediate_check")->setEnabled(mCanApplyImmediately); getChild<LLUICtrl>("Pipette")->setCommitCallback( boost::bind(&LLFloaterTexturePicker::onBtnPipette, this)); childSetAction("Cancel", LLFloaterTexturePicker::onBtnCancel,this); @@ -483,7 +477,7 @@ void LLFloaterTexturePicker::draw() } getChildView("Default")->setEnabled(mImageAssetID != mDefaultImageAssetID || mTentative); - getChildView("Blank")->setEnabled(mImageAssetID != mBlankImageAssetID || mTentative); + getChildView("Blank")->setEnabled((mImageAssetID != mBlankImageAssetID && mBlankImageAssetID != mDefaultImageAssetID) || mTentative); getChildView("None")->setEnabled(mAllowNoTexture && (!mImageAssetID.isNull() || mTentative)); LLFloater::draw(); @@ -1146,7 +1140,7 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p) mOnCloseCallback(NULL), mOnSelectCallback(NULL), mBorderColor( p.border_color() ), - mAllowNoTexture( FALSE ), + mAllowNoTexture( p.allow_no_texture ), mAllowLocalTexture( TRUE ), mImmediateFilterPermMask( PERM_NONE ), mNonImmediateFilterPermMask( PERM_NONE ), |