diff options
author | Graham Madarasz <graham@lindenlab.com> | 2013-05-23 10:42:32 -0700 |
---|---|---|
committer | Graham Madarasz <graham@lindenlab.com> | 2013-05-23 10:42:32 -0700 |
commit | 9ef98bece29b6740e4f779ab6a3534b5b1e7f974 (patch) | |
tree | 55211701d33b55ac9c449b6ffb1059850d032cc0 /indra/newview/llpanelface.cpp | |
parent | 74a84738ed8779e345f34b95f029862b3c9ccf6e (diff) |
NORSPEC-193 NORSPEC-161 make legacy shiny a batch breaker when materials are in play
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rwxr-xr-x | indra/newview/llpanelface.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 49750c8c19..33c77ed98f 100755 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1799,9 +1799,12 @@ void LLPanelFace::updateMaterial() bool is_default_blend_mode = mIsAlpha ? (alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND) : (alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_NONE); + LLUUID norm_map_id = getChild<LLTextureCtrl>("bumpytexture control")->getImageAssetID(); + LLUUID spec_map_id = getChild<LLTextureCtrl>("shinytexture control")->getImageAssetID(); + if ( !is_default_blend_mode - || (bumpiness == BUMPY_TEXTURE) - || (shininess == SHINY_TEXTURE)) + || !norm_map_id.isNull() + || !spec_map_id.isNull()) { // This should match getState() struct f1 : public LLSelectedTEGetFunctor<LLMaterialPtr> @@ -1822,7 +1825,7 @@ void LLPanelFace::updateMaterial() material->setDiffuseAlphaMode(getChild<LLComboBox>("combobox alphamode")->getCurrentIndex()); material->setAlphaMaskCutoff((U8)(getChild<LLUICtrl>("maskcutoff")->getValue().asInteger())); - LLUUID norm_map_id = getChild<LLTextureCtrl>("bumpytexture control")->getImageAssetID(); + if (!norm_map_id.isNull() && (bumpiness == BUMPY_TEXTURE)) { LL_DEBUGS("Materials") << "Setting bumpy texture, bumpiness = " << bumpiness << LL_ENDL; @@ -1852,7 +1855,7 @@ void LLPanelFace::updateMaterial() material->setNormalRotation(0.0f); } - LLUUID spec_map_id = getChild<LLTextureCtrl>("shinytexture control")->getImageAssetID(); + if (!spec_map_id.isNull() && (shininess == SHINY_TEXTURE)) { |