summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llprimitive/llgltfmaterial.cpp4
-rw-r--r--indra/newview/llpanelface.cpp18
2 files changed, 11 insertions, 11 deletions
diff --git a/indra/llprimitive/llgltfmaterial.cpp b/indra/llprimitive/llgltfmaterial.cpp
index 649d4dbe8f..6d23cb8039 100644
--- a/indra/llprimitive/llgltfmaterial.cpp
+++ b/indra/llprimitive/llgltfmaterial.cpp
@@ -158,13 +158,13 @@ void LLGLTFMaterial::setFromModel(const tinygltf::Model& model, S32 mat_index)
if (material_in.extras.IsObject())
{
tinygltf::Value::Object extras = material_in.extras.Get<tinygltf::Value::Object>();
- auto& alpha_mode = extras.find("override_alpha_mode");
+ const auto& alpha_mode = extras.find("override_alpha_mode");
if (alpha_mode != extras.end())
{
mOverrideAlphaMode = alpha_mode->second.Get<bool>();
}
- auto& double_sided = extras.find("override_double_sided");
+ const auto& double_sided = extras.find("override_double_sided");
if (double_sided != extras.end())
{
mOverrideDoubleSided = double_sided->second.Get<bool>();
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 );
}
}