diff options
author | Dave Parks <davep@lindenlab.com> | 2013-03-30 15:51:16 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-03-30 15:51:16 -0500 |
commit | adcf2d98e39bc8cc4b480bcf8d88a037d9b4140d (patch) | |
tree | 5ec5e9d94a7531ebd1582b0985543db7363eea81 /indra/newview/llpanelface.cpp | |
parent | 1f739cb7bc8de7a1cc5faf3218fb350689c7fbcd (diff) |
NORSPEC-72 Set default value of glossiness to 0.2
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rw-r--r-- | indra/newview/llpanelface.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 210b1e9dca..7b99d5897e 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1309,7 +1309,22 @@ void LLPanelFace::updateMaterial() if (!mMaterial) { mMaterial = LLMaterialPtr(new LLMaterial()); + //set defaults according to UI spec + mMaterial->setSpecularLightColor(LLColor4U::white); + mMaterial->setSpecularLightExponent((U8) (255*0.2f)); + mMaterial->setEnvironmentIntensity(0); + mMaterial->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE); + mMaterial->setAlphaMaskCutoff(0); } + else + { + mMaterial->setSpecularLightColor(getChild<LLColorSwatchCtrl>("shinycolorswatch")->get()); + mMaterial->setSpecularLightExponent((U8)(255*getChild<LLUICtrl>("glossiness")->getValue().asReal())); + mMaterial->setEnvironmentIntensity((U8)(255*getChild<LLUICtrl>("environment")->getValue().asReal())); + mMaterial->setDiffuseAlphaMode(getChild<LLComboBox>("combobox alphamode")->getCurrentIndex()); + mMaterial->setAlphaMaskCutoff((U8)(getChild<LLUICtrl>("maskcutoff")->getValue().asInteger())); + } + if (bumpiness == BUMPY_TEXTURE) { LL_DEBUGS("Materials") << "Setting bumpy texture, bumpiness = " << bumpiness << LL_ENDL; @@ -1346,11 +1361,7 @@ void LLPanelFace::updateMaterial() mMaterial->setSpecularRepeat(1.0f,1.0f); mMaterial->setSpecularRotation(0.0f); } - mMaterial->setSpecularLightColor(getChild<LLColorSwatchCtrl>("shinycolorswatch")->get()); - mMaterial->setSpecularLightExponent((U8)(255*getChild<LLUICtrl>("glossiness")->getValue().asReal())); - mMaterial->setEnvironmentIntensity((U8)(255*getChild<LLUICtrl>("environment")->getValue().asReal())); - mMaterial->setDiffuseAlphaMode(getChild<LLComboBox>("combobox alphamode")->getCurrentIndex()); - mMaterial->setAlphaMaskCutoff((U8)(getChild<LLUICtrl>("maskcutoff")->getValue().asInteger())); + LL_DEBUGS("Materials") << "Updating material: " << mMaterial->asLLSD() << LL_ENDL; LLSelectMgr::getInstance()->selectionSetMaterial( mMaterial ); } |