diff options
| -rw-r--r-- | indra/newview/llmaterialeditor.cpp | 11 | 
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 92042ad49f..54d85c87ac 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -1827,7 +1827,12 @@ bool can_use_objects_material(LLSelectedTEGetMatData& func, const std::vector<Pe          return false;      } +    // func.mIsOverride=true is used for the singleton material editor floater +    // associated with the build floater. This flag also excludes objects from +    // the selection that do not satisfy PERM_MODIFY. +    llassert(func.mIsOverride);      LLSelectMgr::getInstance()->getSelection()->applyToTEs(&func, true /*first applicable*/); +      LLViewerObject* selected_object = func.mObject;      if (!selected_object)      { @@ -1928,7 +1933,7 @@ bool can_use_objects_material(LLSelectedTEGetMatData& func, const std::vector<Pe  bool LLMaterialEditor::canModifyObjectsMaterial()  { -    LLSelectedTEGetMatData func(false); +    LLSelectedTEGetMatData func(true);      LLPermissions permissions;      LLViewerInventoryItem* item_out;      return can_use_objects_material(func, std::vector({PERM_MODIFY}), permissions, item_out); @@ -1936,7 +1941,7 @@ bool LLMaterialEditor::canModifyObjectsMaterial()  bool LLMaterialEditor::canSaveObjectsMaterial()  { -    LLSelectedTEGetMatData func(false); +    LLSelectedTEGetMatData func(true);      LLPermissions permissions;      LLViewerInventoryItem* item_out;      return can_use_objects_material(func, std::vector({PERM_COPY, PERM_MODIFY}), permissions, item_out); @@ -1944,7 +1949,7 @@ bool LLMaterialEditor::canSaveObjectsMaterial()  void LLMaterialEditor::saveObjectsMaterialAs()  { -    LLSelectedTEGetMatData func(false); +    LLSelectedTEGetMatData func(true);      LLPermissions permissions;      LLViewerInventoryItem* item = nullptr;      bool allowed = can_use_objects_material(func, std::vector({PERM_COPY, PERM_MODIFY}), permissions, item);  | 
