diff options
author | William Todd Stinson <stinson@lindenlab.com> | 2012-09-06 14:37:00 -0700 |
---|---|---|
committer | William Todd Stinson <stinson@lindenlab.com> | 2012-09-06 14:37:00 -0700 |
commit | 2f53e8e72c47d6a84c757a1f78a0287c2c6a9630 (patch) | |
tree | 86962ec2e717bb1f314970fa0e72eec70f1cc642 /indra | |
parent | c816086cddb909a09851e9039c98239ecaabb1f8 (diff) |
Updating the viewer to handle diffuse alpha as mode rather than a boolean.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloaterstinson.cpp | 56 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_stinson.xml | 30 |
2 files changed, 43 insertions, 43 deletions
diff --git a/indra/newview/llfloaterstinson.cpp b/indra/newview/llfloaterstinson.cpp index c0aa2a637e..54140cf38d 100644 --- a/indra/newview/llfloaterstinson.cpp +++ b/indra/newview/llfloaterstinson.cpp @@ -57,21 +57,21 @@ #include "v4color.h" #include "v4coloru.h" -#define MATERIALS_CAPABILITY_NAME "RenderMaterials" - -#define MATERIALS_CAP_FULL_PER_FACE_FIELD "FullMaterialsPerFace" -#define MATERIALS_CAP_FACE_FIELD "Face" -#define MATERIALS_CAP_MATERIAL_FIELD "Material" -#define MATERIALS_CAP_OBJECT_ID_FIELD "ID" -#define MATERIALS_CAP_MATERIAL_ID_FIELD "MaterialID" - -#define MATERIALS_CAP_NORMAL_MAP_FIELD "NormMap" -#define MATERIALS_CAP_SPECULAR_MAP_FIELD "SpecMap" -#define MATERIALS_CAP_SPECULAR_COLOR_FIELD "SpecColor" -#define MATERIALS_CAP_SPECULAR_EXP_FIELD "SpecExp" -#define MATERIALS_CAP_ENV_INTENSITY_FIELD "EnvIntensity" -#define MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD "AlphaMaskCutoff" -#define MATERIALS_CAP_DIFFUSE_ALPHA_IS_MASK_FIELD "DiffAlphaIsMask" +#define MATERIALS_CAPABILITY_NAME "RenderMaterials" + +#define MATERIALS_CAP_FULL_PER_FACE_FIELD "FullMaterialsPerFace" +#define MATERIALS_CAP_FACE_FIELD "Face" +#define MATERIALS_CAP_MATERIAL_FIELD "Material" +#define MATERIALS_CAP_OBJECT_ID_FIELD "ID" +#define MATERIALS_CAP_MATERIAL_ID_FIELD "MaterialID" + +#define MATERIALS_CAP_NORMAL_MAP_FIELD "NormMap" +#define MATERIALS_CAP_SPECULAR_MAP_FIELD "SpecMap" +#define MATERIALS_CAP_SPECULAR_COLOR_FIELD "SpecColor" +#define MATERIALS_CAP_SPECULAR_EXP_FIELD "SpecExp" +#define MATERIALS_CAP_ENV_INTENSITY_FIELD "EnvIntensity" +#define MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD "AlphaMaskCutoff" +#define MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD "DiffuseAlphaMode" class MaterialsResponder : public LLHTTPClient::Responder { @@ -451,7 +451,7 @@ void LLFloaterStinson::requestPutMaterials(bool pIsDoSet) materialData[MATERIALS_CAP_SPECULAR_EXP_FIELD] = static_cast<LLSD::Integer>(100); materialData[MATERIALS_CAP_ENV_INTENSITY_FIELD] = static_cast<LLSD::Integer>(25); materialData[MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD] = static_cast<LLSD::Integer>(37); - materialData[MATERIALS_CAP_DIFFUSE_ALPHA_IS_MASK_FIELD] = static_cast<LLSD::Boolean>(false); + materialData[MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD] = static_cast<LLSD::Integer>(0); } else if ((curFaceIndex % FACE_MODULATOR) == 1) { @@ -462,7 +462,7 @@ void LLFloaterStinson::requestPutMaterials(bool pIsDoSet) materialData[MATERIALS_CAP_SPECULAR_EXP_FIELD] = static_cast<LLSD::Integer>(255); materialData[MATERIALS_CAP_ENV_INTENSITY_FIELD] = static_cast<LLSD::Integer>(0); materialData[MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD] = static_cast<LLSD::Integer>(5); - materialData[MATERIALS_CAP_DIFFUSE_ALPHA_IS_MASK_FIELD] = static_cast<LLSD::Boolean>(true); + materialData[MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD] = static_cast<LLSD::Integer>(1); } else if ((curFaceIndex % FACE_MODULATOR) == 2) { @@ -473,7 +473,7 @@ void LLFloaterStinson::requestPutMaterials(bool pIsDoSet) materialData[MATERIALS_CAP_SPECULAR_EXP_FIELD] = static_cast<LLSD::Integer>(1); materialData[MATERIALS_CAP_ENV_INTENSITY_FIELD] = static_cast<LLSD::Integer>(255); materialData[MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD] = static_cast<LLSD::Integer>(75); - materialData[MATERIALS_CAP_DIFFUSE_ALPHA_IS_MASK_FIELD] = static_cast<LLSD::Boolean>(false); + materialData[MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD] = static_cast<LLSD::Integer>(3); } else if ((curFaceIndex % FACE_MODULATOR) == 3) { @@ -641,9 +641,9 @@ void LLFloaterStinson::parseGetResponse(const LLSD& pContent) llassert(materialData.get(MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD).isInteger()); S32 alphaMaskCutoff = materialData.get(MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD).asInteger(); - llassert(materialData.has(MATERIALS_CAP_DIFFUSE_ALPHA_IS_MASK_FIELD)); - llassert(materialData.get(MATERIALS_CAP_DIFFUSE_ALPHA_IS_MASK_FIELD).isInteger()); - BOOL isDiffuseAlphaMask = static_cast<BOOL>(materialData.get(MATERIALS_CAP_DIFFUSE_ALPHA_IS_MASK_FIELD).asInteger()); + llassert(materialData.has(MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD)); + llassert(materialData.get(MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD).isInteger()); + S32 diffuseAlphaMode = static_cast<BOOL>(materialData.get(MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD).asInteger()); cellParams.font = LLFontGL::getFontMonospace(); @@ -679,8 +679,8 @@ void LLFloaterStinson::parseGetResponse(const LLSD& pContent) cellParams.value = llformat("%d", alphaMaskCutoff); rowParams.columns.add(cellParams); - cellParams.column = "is_diffuse_alpha_mask"; - cellParams.value = (isDiffuseAlphaMask ? "True" : "False"); + cellParams.column = "diffuse_alpha_mode"; + cellParams.value = llformat("%d", diffuseAlphaMode); rowParams.columns.add(cellParams); rowParams.value = materialID; @@ -783,9 +783,9 @@ void LLFloaterStinson::parsePostResponse(const LLSD& pContent) llassert(materialData.get(MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD).isInteger()); S32 alphaMaskCutoff = materialData.get(MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD).asInteger(); - llassert(materialData.has(MATERIALS_CAP_DIFFUSE_ALPHA_IS_MASK_FIELD)); - llassert(materialData.get(MATERIALS_CAP_DIFFUSE_ALPHA_IS_MASK_FIELD).isInteger()); - BOOL isDiffuseAlphaMask = static_cast<BOOL>(materialData.get(MATERIALS_CAP_DIFFUSE_ALPHA_IS_MASK_FIELD).asInteger()); + llassert(materialData.has(MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD)); + llassert(materialData.get(MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD).isInteger()); + S32 diffuseAlphaMode = materialData.get(MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD).asInteger(); cellParams.font = LLFontGL::getFontMonospace(); @@ -821,8 +821,8 @@ void LLFloaterStinson::parsePostResponse(const LLSD& pContent) cellParams.value = llformat("%d", alphaMaskCutoff); rowParams.columns.add(cellParams); - cellParams.column = "is_diffuse_alpha_mask"; - cellParams.value = (isDiffuseAlphaMask ? "True" : "False"); + cellParams.column = "diffuse_alpha_mode"; + cellParams.value = llformat("%d", diffuseAlphaMode); rowParams.columns.add(cellParams); rowParams.value = materialID; diff --git a/indra/newview/skins/default/xui/en/floater_stinson.xml b/indra/newview/skins/default/xui/en/floater_stinson.xml index ddfbcbd0c9..b152dd5fc8 100644 --- a/indra/newview/skins/default/xui/en/floater_stinson.xml +++ b/indra/newview/skins/default/xui/en/floater_stinson.xml @@ -4,7 +4,7 @@ can_tear_off="false" can_resize="true" height="575" - width="1254" + width="1244" min_height="600" min_width="1100" layout="topleft" @@ -66,7 +66,7 @@ name="horiz_separator" top_pad="0" left="12" - width="1230"/> + width="1220"/> <panel border="false" bevel_style="none" @@ -74,7 +74,7 @@ layout="topleft" height="167" top_pad="10" - width="1230"> + width="1220"> <button follows="left|top" height="22" @@ -93,7 +93,7 @@ tab_stop="false" multi_select="true" name="get_scroll_list" - width="1230"> + width="1220"> <scroll_list.columns label="Material ID" name="id" @@ -123,9 +123,9 @@ name="alpha_mask_cutoff" width="110" /> <scroll_list.columns - label="Is Diffuse Alpha Mask" - name="is_diffuse_alpha_mask" - width="128" /> + label="Diffuse Alpha Mode" + name="diffuse_alpha_mode" + width="118" /> </scroll_list> </panel> <view_border @@ -136,7 +136,7 @@ name="horiz_separator" top_pad="10" left="12" - width="1230"/> + width="1220"/> <panel border="false" bevel_style="none" @@ -145,7 +145,7 @@ left="12" top_pad="10" height="132" - width="400"> + width="450"> <button follows="left|top" height="22" @@ -196,7 +196,7 @@ name="horiz_separator" top_pad="10" left="12" - width="1230"/> + width="1220"/> <panel border="false" bevel_style="none" @@ -205,7 +205,7 @@ left="12" top_pad="10" height="132" - width="1230"> + width="1220"> <button follows="left|top" height="22" @@ -233,7 +233,7 @@ tab_stop="false" multi_select="true" name="post_scroll_list" - width="1230"> + width="1220"> <scroll_list.columns label="Material ID" name="id" @@ -263,9 +263,9 @@ name="alpha_mask_cutoff" width="110" /> <scroll_list.columns - label="Is Diffuse Alpha Mask" - name="is_diffuse_alpha_mask" - width="128" /> + label="Diffuse Alpha Mode" + name="diffuse_alpha_mode" + width="118" /> </scroll_list> </panel> </floater> |