summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-11-02 14:58:45 -0500
committerDave Parks <davep@lindenlab.com>2022-11-02 14:58:45 -0500
commit106b1a6e6add67f7770d508d8be1d0eff77ebd32 (patch)
tree416f575cb94ab0a20cbd42b2372118c7dc667514 /indra/newview
parent3e7e146be689233b21e31c091298dcfa2cb1adfc (diff)
parent89e9cdd482072e246e4d7fa578929ffad1c54ac4 (diff)
Merge branch 'DRTVWR-559' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llmaterialeditor.cpp16
-rw-r--r--indra/newview/llmaterialeditor.h1
-rw-r--r--indra/newview/llpanelface.cpp18
-rw-r--r--indra/newview/skins/default/xui/en/floater_live_material_editor.xml12
-rw-r--r--indra/newview/skins/default/xui/en/floater_material_editor.xml13
-rw-r--r--indra/newview/skins/default/xui/en/panel_gltf_material.xml4
6 files changed, 40 insertions, 24 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 792a916e6b..cf627cf992 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -443,6 +443,20 @@ void LLMaterialEditor::onClose(bool app_quitting)
LLPreview::onClose(app_quitting);
}
+void LLMaterialEditor::handleReshape(const LLRect& new_rect, bool by_user)
+{
+ if (by_user)
+ {
+ const LLRect old_rect = getRect();
+ LLRect clamp_rect(new_rect);
+ clamp_rect.mRight = clamp_rect.mLeft + old_rect.getWidth();
+ LLPreview::handleReshape(clamp_rect, by_user);
+ }
+ else
+ {
+ LLPreview::handleReshape(new_rect, by_user);
+ }
+}
LLUUID LLMaterialEditor::getBaseColorId()
{
@@ -648,7 +662,7 @@ void LLMaterialEditor::resetUnsavedChanges()
void LLMaterialEditor::markChangesUnsaved(U32 dirty_flag)
{
mUnsavedChanges |= dirty_flag;
- if (!mIsOverride)
+ if (mIsOverride)
{
// at the moment live editing (mIsOverride) applies everything 'live'
// and "unsaved_changes", save/cancel buttons don't exist there
diff --git a/indra/newview/llmaterialeditor.h b/indra/newview/llmaterialeditor.h
index 0ffad5f54a..dc41cc386f 100644
--- a/indra/newview/llmaterialeditor.h
+++ b/indra/newview/llmaterialeditor.h
@@ -167,6 +167,7 @@ public:
void onClickCloseBtn(bool app_quitting = false) override;
void onClose(bool app_quitting) override;
+ void handleReshape(const LLRect& new_rect, bool by_user = false) override;
LLUUID getBaseColorId();
void setBaseColorId(const LLUUID& id);
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 04957729ed..c4d7eb46df 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -1140,11 +1140,11 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
updateAlphaControls();
if (texture_ctrl)
- {
+ {
if (identical_diffuse)
{
texture_ctrl->setTentative(FALSE);
- texture_ctrl->setEnabled(editable);
+ texture_ctrl->setEnabled(editable && !has_pbr_material);
texture_ctrl->setImageAssetID(id);
getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha && transparency <= 0.f && !has_pbr_material);
getChildView("label alphamode")->setEnabled(editable && mIsAlpha && !has_pbr_material);
@@ -1154,7 +1154,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
texture_ctrl->setBakeTextureEnabled(TRUE);
}
else if (id.isNull())
- {
+ {
// None selected
texture_ctrl->setTentative(FALSE);
texture_ctrl->setEnabled(FALSE);
@@ -1165,12 +1165,12 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
getChildView("label maskcutoff")->setEnabled(FALSE);
texture_ctrl->setBakeTextureEnabled(false);
- }
- else
- {
+ }
+ else
+ {
// Tentative: multiple selected with different textures
texture_ctrl->setTentative(TRUE);
- texture_ctrl->setEnabled(editable);
+ texture_ctrl->setEnabled(editable && !has_pbr_material);
texture_ctrl->setImageAssetID(id);
getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha && transparency <= 0.f && !has_pbr_material);
getChildView("label alphamode")->setEnabled(editable && mIsAlpha && !has_pbr_material);
@@ -1185,14 +1185,14 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
if (shinytexture_ctrl)
{
shinytexture_ctrl->setTentative( !identical_spec );
- shinytexture_ctrl->setEnabled( editable );
+ shinytexture_ctrl->setEnabled( editable && !has_pbr_material);
shinytexture_ctrl->setImageAssetID( specmap_id );
}
if (bumpytexture_ctrl)
{
bumpytexture_ctrl->setTentative( !identical_norm );
- bumpytexture_ctrl->setEnabled( editable );
+ bumpytexture_ctrl->setEnabled( editable && !has_pbr_material);
bumpytexture_ctrl->setImageAssetID( normmap_id );
}
}
diff --git a/indra/newview/skins/default/xui/en/floater_live_material_editor.xml b/indra/newview/skins/default/xui/en/floater_live_material_editor.xml
index 317783f794..7759bc2399 100644
--- a/indra/newview/skins/default/xui/en/floater_live_material_editor.xml
+++ b/indra/newview/skins/default/xui/en/floater_live_material_editor.xml
@@ -3,7 +3,7 @@
legacy_header_height="18"
can_resize="true"
default_tab_group="1"
- height="786"
+ height="790"
width="256"
min_height="500"
min_width="256"
@@ -14,10 +14,10 @@
title="Editing Material">
<scroll_container
name="materials_scroll"
- top="14"
+ top="18"
left="4"
height="768"
- width="247"
+ width="250"
follows="all"
layout="topleft"
color="DkGray2"
@@ -26,12 +26,12 @@
<panel
name="panel_material"
filename="panel_gltf_material.xml"
- border="false"
- visible="true"
layout="topleft"
+ follows="left|top|right"
+ border="false"
top="0"
left="0"
height="768"
- width="247" />
+ width="236" />
</scroll_container>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_material_editor.xml b/indra/newview/skins/default/xui/en/floater_material_editor.xml
index 29def9bd53..1a53d7832d 100644
--- a/indra/newview/skins/default/xui/en/floater_material_editor.xml
+++ b/indra/newview/skins/default/xui/en/floater_material_editor.xml
@@ -3,7 +3,7 @@
legacy_header_height="18"
can_resize="true"
default_tab_group="1"
- height="887"
+ height="891"
width="256"
min_height="500"
min_width="256"
@@ -19,25 +19,26 @@
<scroll_container
name="materials_scroll"
- top="14"
+ top="18"
left="4"
height="768"
- width="247"
+ width="250"
follows="all"
layout="topleft"
color="DkGray2"
opaque="true"
+ border="false"
reserve_scroll_corner="false">
<panel
name="panel_material"
filename="panel_gltf_material.xml"
- border="false"
- visible="true"
layout="topleft"
+ follows="left|top|right"
+ border="false"
top="0"
left="0"
height="768"
- width="247" />
+ width="236" />
</scroll_container>
<panel
diff --git a/indra/newview/skins/default/xui/en/panel_gltf_material.xml b/indra/newview/skins/default/xui/en/panel_gltf_material.xml
index f4060648b9..2936b3cb63 100644
--- a/indra/newview/skins/default/xui/en/panel_gltf_material.xml
+++ b/indra/newview/skins/default/xui/en/panel_gltf_material.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
layout="topleft"
- follows="all"
+ follows="left|top|right"
border="false"
name="panel_gltf_material"
top="0"
@@ -129,7 +129,7 @@
left_delta="0"
name="alpha mode"
top_pad="4"
- width="96">
+ width="89">
<combo_box.item
label="Opaque"
name="None"