summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-11-18 21:06:48 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-11-18 21:15:54 +0200
commitade79bc6f6b6269dbcb88f3dff2db6584d0c2f53 (patch)
tree67c1e35b47afa9a80f26f86effe2f9d9ca46379b /indra/newview/llviewermenu.cpp
parent32663643c77a931892a2f8e40e011c60bc726d4e (diff)
SL-18677 Disable materials UI when materials caps are not available
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index c214ea164d..76a5cf8f5e 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2807,6 +2807,11 @@ struct LLSelectedTEGetmatIdAndPermissions : public LLSelectedTEFunctor
bool enable_object_edit_gltf_material()
{
+ if (!LLMaterialEditor::capabilitiesAvalaible())
+ {
+ return false;
+ }
+
LLSelectedTEGetmatIdAndPermissions func;
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&func);
return func.mCanModify && func.mMaterialId.notNull();
@@ -2814,6 +2819,11 @@ bool enable_object_edit_gltf_material()
bool enable_object_save_gltf_material()
{
+ if (!LLMaterialEditor::capabilitiesAvalaible())
+ {
+ return false;
+ }
+
LLSelectedTEGetmatIdAndPermissions func;
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&func);
return func.mCanCopy && func.mMaterialId.notNull();