From adcf2d98e39bc8cc4b480bcf8d88a037d9b4140d Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Sat, 30 Mar 2013 15:51:16 -0500 Subject: NORSPEC-72 Set default value of glossiness to 0.2 --- indra/newview/llpanelface.cpp | 21 ++++++++++++++++----- .../skins/default/xui/en/panel_tools_texture.xml | 2 +- 2 files changed, 17 insertions(+), 6 deletions(-) (limited to 'indra') 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("shinycolorswatch")->get()); + mMaterial->setSpecularLightExponent((U8)(255*getChild("glossiness")->getValue().asReal())); + mMaterial->setEnvironmentIntensity((U8)(255*getChild("environment")->getValue().asReal())); + mMaterial->setDiffuseAlphaMode(getChild("combobox alphamode")->getCurrentIndex()); + mMaterial->setAlphaMaskCutoff((U8)(getChild("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("shinycolorswatch")->get()); - mMaterial->setSpecularLightExponent((U8)(255*getChild("glossiness")->getValue().asReal())); - mMaterial->setEnvironmentIntensity((U8)(255*getChild("environment")->getValue().asReal())); - mMaterial->setDiffuseAlphaMode(getChild("combobox alphamode")->getCurrentIndex()); - mMaterial->setAlphaMaskCutoff((U8)(getChild("maskcutoff")->getValue().asInteger())); + LL_DEBUGS("Materials") << "Updating material: " << mMaterial->asLLSD() << LL_ENDL; LLSelectMgr::getInstance()->selectionSetMaterial( mMaterial ); } diff --git a/indra/newview/skins/default/xui/en/panel_tools_texture.xml b/indra/newview/skins/default/xui/en/panel_tools_texture.xml index 8382ad69d1..e156b3e07c 100644 --- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml @@ -394,7 +394,7 @@ max_value="1" follows="left|top" height="19" - initial_value="0" + initial_value="0.2" layout="topleft" top_delta="-4" left_pad="10" -- cgit v1.2.3