diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-11-16 23:23:43 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-11-16 23:23:43 +0200 |
commit | bfe5e3f289e4a260f10bcfffb8eca809c89f65d6 (patch) | |
tree | f17e6fccc3749fe0ffd3a8703a5ebc04205fdcdf /indra/newview | |
parent | 07ada65df1c72adff6e356011840ca262beb4be0 (diff) |
SL-18648 Material editor should only allow full-perm textures
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llmaterialeditor.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index a9728e26da..7491f17f9e 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -378,6 +378,17 @@ BOOL LLMaterialEditor::postBuild() mBaseColorCtrl = getChild<LLColorSwatchCtrl>("base color"); mEmissiveColorCtrl = getChild<LLColorSwatchCtrl>("emissive color"); + // Only allow fully permissive textures + mBaseColorTextureCtrl->setImmediateFilterPermMask(PERM_ITEM_UNRESTRICTED); + mBaseColorTextureCtrl->setNonImmediateFilterPermMask(PERM_ITEM_UNRESTRICTED); + mMetallicTextureCtrl->setImmediateFilterPermMask(PERM_ITEM_UNRESTRICTED); + mMetallicTextureCtrl->setNonImmediateFilterPermMask(PERM_ITEM_UNRESTRICTED); + mEmissiveTextureCtrl->setImmediateFilterPermMask(PERM_ITEM_UNRESTRICTED); + mEmissiveTextureCtrl->setNonImmediateFilterPermMask(PERM_ITEM_UNRESTRICTED); + mNormalTextureCtrl->setImmediateFilterPermMask(PERM_ITEM_UNRESTRICTED); + mNormalTextureCtrl->setNonImmediateFilterPermMask(PERM_ITEM_UNRESTRICTED); + + // Texture callback mBaseColorTextureCtrl->setCommitCallback(boost::bind(&LLMaterialEditor::onCommitTexture, this, _1, _2, MATERIAL_BASE_COLOR_TEX_DIRTY)); mMetallicTextureCtrl->setCommitCallback(boost::bind(&LLMaterialEditor::onCommitTexture, this, _1, _2, MATERIAL_METALLIC_ROUGHTNESS_TEX_DIRTY)); mEmissiveTextureCtrl->setCommitCallback(boost::bind(&LLMaterialEditor::onCommitTexture, this, _1, _2, MATERIAL_EMISIVE_TEX_DIRTY)); |