diff options
author | Graham Madarasz <graham@lindenlab.com> | 2013-05-14 15:26:43 -0700 |
---|---|---|
committer | Graham Madarasz <graham@lindenlab.com> | 2013-05-14 15:26:43 -0700 |
commit | a37bff8bf1add5afe154b25156d7ebe38ff9af31 (patch) | |
tree | 1fa6995202747973935bd903b9bd2d31b89d8700 /indra/newview/llpanelface.cpp | |
parent | 8b6be5c667230c61d0de590de122fdef956150b7 (diff) |
NORSPEC-103 reflect normal/spec UVs in face edit overlay display
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rwxr-xr-x | indra/newview/llpanelface.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 9d0b9d0cac..f8c05bd007 100755 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1646,6 +1646,18 @@ void LLPanelFace::updateUI() getChild<LLColorSwatchCtrl>("shinycolorswatch")->set(material->getSpecularLightColor(),TRUE); } + // Update sel manager as to which channel we're editing so it can reflect the correct overlay UI + // NORSPEC-103 + LLRender::eTexIndex channel_to_edit = (combobox_matmedia->getCurrentIndex() == MATMEDIA_MATERIAL) ? (LLRender::eTexIndex)combobox_mattype->getCurrentIndex() : LLRender::DIFFUSE_MAP; + + if ( ((channel_to_edit == LLRender::NORMAL_MAP) && material->getNormalID().isNull()) + ||((channel_to_edit == LLRender::SPECULAR_MAP) && material->getSpecularID().isNull())) + { + channel_to_edit = LLRender::DIFFUSE_MAP; + } + + LLSelectMgr::getInstance()->setTextureChannel(channel_to_edit); + // Bumpy (normal) texture_ctrl = getChild<LLTextureCtrl>("bumpytexture control"); texture_ctrl->setImageAssetID(material->getNormalID()); @@ -1670,7 +1682,10 @@ void LLPanelFace::updateUI() } updateBumpyControls(!material->getNormalID().isNull(), true); } - + else + { + LLSelectMgr::getInstance()->setTextureChannel(LLRender::DIFFUSE_MAP); + } } // Set variable values for numeric expressions @@ -1856,7 +1871,7 @@ void LLPanelFace::updateMaterial() } LL_DEBUGS("Materials") << "Updating material: " << material->asLLSD() << LL_ENDL; - + LLSelectMgr::getInstance()->selectionSetMaterial( material ); } else |