summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcosmic-linden <111533034+cosmic-linden@users.noreply.github.com>2024-03-13 17:07:42 -0700
committerGitHub <noreply@github.com>2024-03-13 17:07:42 -0700
commite056d4f7203f227fe1ea7feba59f5c6f7fd977ed (patch)
tree83df4541c9415f5032d706ec1e923efebf3b6924
parent665d59d46eced8b0864d83191e7391933bb308ac (diff)
parent1a539523e292aa28fe8e07e9f30d70acb4e67b8f (diff)
Merge pull request #992 from secondlife/vi-76
secondlife/viewer#76: Change wording of terrain blending documentation when using materials
-rw-r--r--doc/testplans/pbr_terrain_composition.md2
-rw-r--r--indra/newview/llfloaterregioninfo.cpp13
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_terrain.xml37
3 files changed, 52 insertions, 0 deletions
diff --git a/doc/testplans/pbr_terrain_composition.md b/doc/testplans/pbr_terrain_composition.md
index 127fe950a8..524583aa7a 100644
--- a/doc/testplans/pbr_terrain_composition.md
+++ b/doc/testplans/pbr_terrain_composition.md
@@ -29,6 +29,8 @@ When the Region/Estate floater is opened to the terrain Tab, the current terrain
- If it is texture terrain, the "PBR Metallic Roughness" checkbox should be unchecked, and the floater should display the four textures applied to the terrain.
- If it is material terrain, the "PBR Metallic Roughness" checkbox should be checked, and the floater should display the four materials applied to the terrain.
+In addition, where possible, textual labels and descriptions in the tab should make sense given the current value of the "PBR Metallic Roughness" checkbox. If the checkbox is unchecked, the labels should refer to textures. If the checkbox is checked, the labels should refer to materials.
+
### Toggling Composition Type
When toggling the "PBR Metallic Roughness" checkbox to the opposite value, which does not correspond to the current terrain type, one of the following sets of four terrain swatches will be displayed:
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 454842999d..6ad776643d 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -1479,6 +1479,19 @@ void LLPanelRegionTerrainInfo::updateForMaterialType()
if (texture_label) { texture_label->setVisible(show_texture_controls); }
LLUICtrl* material_label = findChild<LLUICtrl>("detail_material_text");
if (material_label) { material_label->setVisible(show_material_controls); }
+
+ // Toggle visibility of documentation labels for terrain blending ranges
+ const std::vector<std::string> doc_suffixes { "5", "10", "11" };
+ std::string buffer;
+ for (const std::string& suffix : doc_suffixes)
+ {
+ buffer = "height_text_lbl" + suffix;
+ LLUICtrl* texture_doc_label = findChild<LLUICtrl>(buffer);
+ if (texture_doc_label) { texture_doc_label->setVisible(show_texture_controls); }
+ buffer += "_material";
+ LLUICtrl* material_doc_label = findChild<LLUICtrl>(buffer);
+ if (material_doc_label) { material_doc_label->setVisible(show_material_controls); }
+ }
}
// virtual
diff --git a/indra/newview/skins/default/xui/en/panel_region_terrain.xml b/indra/newview/skins/default/xui/en/panel_region_terrain.xml
index f8d2c90d0a..38d885d72d 100644
--- a/indra/newview/skins/default/xui/en/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_terrain.xml
@@ -258,6 +258,19 @@
Texture Elevation Ranges
</text>
<text
+ visible="false"
+ type="string"
+ length="1"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left="10"
+ name="height_text_lbl5_material"
+ top_delta="0"
+ width="300">
+ Material Elevation Ranges
+ </text>
+ <text
follows="left|top"
height="20"
layout="topleft"
@@ -269,6 +282,18 @@
These values represent the blend range for the textures above.
</text>
<text
+ visible="false"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left="10"
+ name="height_text_lbl10_material"
+ top_delta="0"
+ width="200"
+ word_wrap="true">
+ These values represent the blend range for the materials above.
+ </text>
+ <text
follows="left|top"
height="60"
layout="topleft"
@@ -280,6 +305,18 @@
Measured in meters, the LOW value is the MAXIMUM height of Texture #1, and the HIGH value is the MINIMUM height of Texture #4.
</text>
<text
+ visible="false"
+ follows="left|top"
+ height="60"
+ layout="topleft"
+ left_delta="0"
+ name="height_text_lbl11_material"
+ top_delta="0"
+ width="200"
+ word_wrap="true">
+ Measured in meters, the LOW value is the MAXIMUM height of Material #1, and the HIGH value is the MINIMUM height of Material #4.
+ </text>
+ <text
follows="left|top"
height="20"
layout="topleft"