diff options
author | Dave Parks <davep@lindenlab.com> | 2013-04-17 16:46:32 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-04-17 16:46:32 -0500 |
commit | 35ede26097161ec9ab02dd0228ae9c95fce941ee (patch) | |
tree | 9d3b83199cdc0aa404fa8dd9ce925c9729fc0530 /indra | |
parent | 4b2d6062ba1865f6c89175cf047c3e772bcd03bd (diff) |
NORSPEC-128 Edit glossiness and environment as U8's from [0,255], as they are stored
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelface.cpp | 8 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_tools_texture.xml | 16 |
2 files changed, 13 insertions, 11 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index be88cb6ab6..2d2a0d6d0c 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1720,8 +1720,8 @@ void LLPanelFace::onMaterialLoaded(const LLMaterialID& material_id, const LLMate getChild<LLUICtrl>("shinyOffsetV")->setValue(offset_y); getChild<LLColorSwatchCtrl>("shinycolorswatch")->setOriginal(material->getSpecularLightColor()); getChild<LLColorSwatchCtrl>("shinycolorswatch")->set(material->getSpecularLightColor(),TRUE); - getChild<LLUICtrl>("glossiness")->setValue((F32)(material->getSpecularLightExponent())/255.0); - getChild<LLUICtrl>("environment")->setValue((F32)(material->getEnvironmentIntensity())/255.0); + getChild<LLUICtrl>("glossiness")->setValue(material->getSpecularLightExponent()); + getChild<LLUICtrl>("environment")->setValue(material->getEnvironmentIntensity()); } updateShinyControls(combobox_shininess,this, true); @@ -1844,8 +1844,8 @@ void LLPanelFace::updateMaterial() if (!new_material) { 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->setSpecularLightExponent(getChild<LLUICtrl>("glossiness")->getValue().asInteger()); + mMaterial->setEnvironmentIntensity(getChild<LLUICtrl>("environment")->getValue().asInteger()); } } else 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 5e2caa28a9..042134a8c6 100644 --- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml @@ -392,12 +392,13 @@ Glossiness </text> <spinner - decimal_digits="3" - min_value="0" - max_value="1" + decimal_digits="0" + min_val="0" + max_val="255" follows="left|top" height="19" - initial_value="0.2" + initial_value="51" + increment="1" layout="topleft" top_delta="-4" left_pad="10" @@ -417,9 +418,10 @@ Environment </text> <spinner - decimal_digits="3" - min_value="0" - max_value="1" + decimal_digits="0" + min_val="0" + max_val="255" + increment="1" follows="left|top" height="19" initial_value="0" |