diff options
author | Cosmic Linden <cosmic@lindenlab.com> | 2023-09-06 11:47:34 -0700 |
---|---|---|
committer | Cosmic Linden <cosmic@lindenlab.com> | 2023-09-06 11:47:34 -0700 |
commit | c0bcc3740ea4c6662f9707d49ab5c7132bb2a0a8 (patch) | |
tree | 3e6f7b284d52093d09ad743aebb078f41b1dcd56 /indra/newview | |
parent | ab66df94cb7c4cc9a4530ea547aaf81dddec34de (diff) |
SL-20167: Don't block clipboard if GLTF material is null
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llmaterialeditor.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 8f4e0658f6..d4ea725af7 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -1949,6 +1949,24 @@ bool LLMaterialEditor::canSaveObjectsMaterial() bool LLMaterialEditor::canClipboardObjectsMaterial() { + if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() != 1) + { + return false; + } + + struct LLSelectedTEGetNullMat : public LLSelectedTEFunctor + { + bool apply(LLViewerObject* objectp, S32 te_index) + { + return objectp->getRenderMaterialID(te_index).isNull(); + } + } null_func; + + if (LLSelectMgr::getInstance()->getSelection()->applyToTEs(&null_func)) + { + return true; + } + LLSelectedTEGetMatData func(true); LLPermissions permissions; LLViewerInventoryItem* item_out; |