diff options
author | Cosmic Linden <cosmic@lindenlab.com> | 2023-08-07 17:27:30 -0700 |
---|---|---|
committer | Cosmic Linden <cosmic@lindenlab.com> | 2023-08-11 16:31:02 -0700 |
commit | 076a02e2d8ddb10856602c3f5f3115ace41327b5 (patch) | |
tree | 71a86030d3d52045642ea1a21168a2effc98e4f6 /indra/newview | |
parent | 57cc252fd6e3956d53da3c4eb4cad512ddf75e8c (diff) |
SL-20024: Strike a better balance with saved material permissions handling, w/r/t author intent and being easier to understand
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llmaterialeditor.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 989f18f1f4..41df58914b 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -1295,9 +1295,8 @@ bool LLMaterialEditor::updateInventoryItem(const std::string &buffer, const LLUU return true; } -// Callback intended for when an item is copied from an object's inventory and -// needs to be modified to reflect the new asset/name. For example: When saving -// a modified material to the inventory from the build floater. +// Callback intended for when a material is saved from an object and needs to +// be modified to reflect the new asset/name. class LLObjectsMaterialItemCallback : public LLInventoryCallback { public: @@ -1902,12 +1901,22 @@ bool can_use_objects_material(LLSelectedTEGetMatData& func, const std::vector<Pe floater_perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Materials")); floater_perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Materials")); - permissions_out.set(item_permissions); // *NOTE: A close inspection of LLPermissions::accumulate shows that // conflicting UUIDs will be unset. This is acceptable behavior for now. // The server will populate creator info based on the item creation method // used. - permissions_out.accumulate(object_permissions); + // *NOTE: As far as I'm aware, there is currently no good way to preserve + // creation history when there's no material item present. In that case, + // the agent who saved the material will be considered the creator. + // -Cosmic,2023-08-07 + if (item_out) + { + permissions_out.set(item_permissions); + } + else + { + permissions_out.set(object_permissions); + } permissions_out.accumulate(floater_perm); return true; |