summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-11-02 21:54:30 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-11-02 21:54:30 +0200
commit89e9cdd482072e246e4d7fa578929ffad1c54ac4 (patch)
tree82f14e081055d3b12bbcd66b7144a6cfb5e66539
parentd042ad67ed4db72bf0265804e26610e565f15cf2 (diff)
SL-18531 Disable texture controls when editing face with material
-rw-r--r--indra/newview/llpanelface.cpp18
1 files changed, 9 insertions, 9 deletions
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 );
}
}