summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-10-13 21:01:35 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-10-13 21:02:02 +0300
commit3d170fae5d528dfbecacc913fb68c870abbf9ce2 (patch)
tree2dfb72bd61c0b0226ddc6e7f3027871972814cf7 /indra/newview/llviewerinventory.cpp
parent0e3f8db632e2f616b0ab9bd3363c20d2f1acb549 (diff)
SL-18125 Separate GLTF permissions from normal uploads
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 2265379ce4..b4feafb7ff 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -999,6 +999,21 @@ void create_notecard_cb(const LLUUID& inv_item)
}
}
+void create_gltf_material_cb(const LLUUID& inv_item)
+{
+ if (!inv_item.isNull())
+ {
+ LLViewerInventoryItem* item = gInventory.getItem(inv_item);
+ if (item)
+ {
+ set_default_permissions(item, "Materials");
+
+ gInventory.updateItem(item);
+ gInventory.notifyObservers();
+ }
+ }
+}
+
LLInventoryCallbackManager gInventoryCallbacks;
void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,
@@ -1623,6 +1638,13 @@ void create_new_item(const std::string& name,
next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Notecards");
break;
}
+
+ case LLInventoryType::IT_MATERIAL:
+ {
+ cb = new LLBoostFuncInventoryCallback(create_gltf_material_cb);
+ next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Materials");
+ break;
+ }
default:
break;
}