From c334a185f331a3392c2d0ccaf8241166ef9d8049 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Tue, 14 May 2013 05:59:48 -0700 Subject: NORSPEC-151 NORSPEC-152 fix handling of disable of bumpy and shiny in graphics panel to also disable deferred properly and add hooks for default norm and spec textures in texture picker --- indra/newview/lltexturectrl.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/lltexturectrl.cpp') diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index e2d0fdf357..5be342e3d0 100755 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -144,7 +144,7 @@ public: static void onBtnCancel( void* userdata ); void onBtnPipette( ); //static void onBtnRevert( void* userdata ); - static void onBtnWhite( void* userdata ); + static void onBtnBlank( void* userdata ); static void onBtnNone( void* userdata ); static void onBtnClear( void* userdata ); void onSelectionChange(const std::deque &items, BOOL user_action); @@ -426,7 +426,7 @@ BOOL LLFloaterTexturePicker::postBuild() childSetAction("Default",LLFloaterTexturePicker::onBtnSetToDefault,this); childSetAction("None", LLFloaterTexturePicker::onBtnNone,this); - childSetAction("Blank", LLFloaterTexturePicker::onBtnWhite,this); + childSetAction("Blank", LLFloaterTexturePicker::onBtnBlank,this); childSetCommitCallback("show_folders_check", onShowFolders, this); @@ -581,7 +581,7 @@ void LLFloaterTexturePicker::draw() } getChildView("Default")->setEnabled(mImageAssetID != mOwner->getDefaultImageAssetID()); - getChildView("Blank")->setEnabled(mImageAssetID != mWhiteImageAssetID ); + getChildView("Blank")->setEnabled(mImageAssetID != mOwner->getBlankImageAssetID()); getChildView("None")->setEnabled(mOwner->getAllowNoTexture() && !mImageAssetID.isNull() ); LLFloater::draw(); @@ -721,11 +721,11 @@ void LLFloaterTexturePicker::onBtnSetToDefault(void* userdata) } // static -void LLFloaterTexturePicker::onBtnWhite(void* userdata) +void LLFloaterTexturePicker::onBtnBlank(void* userdata) { LLFloaterTexturePicker* self = (LLFloaterTexturePicker*) userdata; self->setCanApply(true, true); - self->setImageID( self->mWhiteImageAssetID ); + self->setImageID( self->mOwner->getBlankImageAssetID() ); self->commitIfImmediateSet(); } -- cgit v1.2.3 From 3c594c5d572a3aa998732c8a98fd0f8f5a4f4bcc Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Wed, 15 May 2013 10:38:10 -0700 Subject: NORSPEC-183 fix regression in diff map blank texture from NSPEC 152 fix by forcing new BlankImageID to the old default --- indra/newview/lltexturectrl.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/lltexturectrl.cpp') diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 5be342e3d0..9badba4143 100755 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -165,7 +165,6 @@ protected: LLUUID mImageAssetID; // Currently selected texture LLUIImagePtr mFallbackImage; // What to show if currently selected texture is null. - LLUUID mWhiteImageAssetID; LLUUID mSpecialCurrentImageAssetID; // Used when the asset id has no corresponding texture in the user's inventory. LLUUID mOriginalImageAssetID; @@ -208,8 +207,7 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( : LLFloater(LLSD()), mOwner( owner ), mImageAssetID( owner->getImageAssetID() ), - mFallbackImage( fallback_image ), - mWhiteImageAssetID( gSavedSettings.getString( "UIImgWhiteUUID" ) ), + mFallbackImage( fallback_image ), mOriginalImageAssetID(owner->getImageAssetID()), mLabel(label), mTentativeLabel(NULL), @@ -1056,6 +1054,12 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p) mDefaultImageName(p.default_image_name), mFallbackImage(p.fallback_image) { + + // Default of defaults is white image for diff tex + // + LLUUID whiteImage( gSavedSettings.getString( "UIImgWhiteUUID" ) ); + setBlankImageAssetID( whiteImage ); + setAllowNoTexture(p.allow_no_texture); setCanApplyImmediately(p.can_apply_immediately); mCommitOnSelection = !p.no_commit_on_selection; -- cgit v1.2.3 From 96f7f6d01bb652fb049cd64b55b2933aa436f9d2 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Tue, 11 Jun 2013 17:18:20 -0700 Subject: NORSPEC-258 and NORSPEC-226 make tex picker close refresh build tool UI correctly and fix issues with transition from no-bumps to normal maps --- indra/newview/lltexturectrl.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/lltexturectrl.cpp') diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 9badba4143..4676f7b251 100755 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1040,6 +1040,7 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p) mDragCallback(NULL), mDropCallback(NULL), mOnCancelCallback(NULL), + mOnCloseCallback(NULL), mOnSelectCallback(NULL), mBorderColor( p.border_color() ), mAllowNoTexture( FALSE ), @@ -1296,6 +1297,10 @@ void LLTextureCtrl::onFloaterClose() if (floaterp) { + if (mOnCloseCallback) + { + mOnCloseCallback(this,LLSD()); + } floaterp->setOwner(NULL); } -- cgit v1.2.3