summaryrefslogtreecommitdiff
path: root/indra/newview/llgltfmateriallist.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-03-12 20:07:53 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-03-13 01:04:13 +0200
commit0ad55a33a06c9d1878199ff1ce3e253a65832dd3 (patch)
tree65afdf348e9b1092f86063a7fa099a87b990a2f9 /indra/newview/llgltfmateriallist.cpp
parentd915cf17dfb4ddd79830f3ff9fea004ba9d2b61c (diff)
#3189 Pasted PBR materials disappearing
Diffstat (limited to 'indra/newview/llgltfmateriallist.cpp')
-rw-r--r--indra/newview/llgltfmateriallist.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp
index 25438eae5e..d8b3f996aa 100644
--- a/indra/newview/llgltfmateriallist.cpp
+++ b/indra/newview/llgltfmateriallist.cpp
@@ -353,6 +353,18 @@ void LLGLTFMaterialList::queueApply(const LLViewerObject* obj, S32 side, const L
}
}
+void LLGLTFMaterialList::queueApply(const LLViewerObject* obj, S32 side, const LLUUID& asset_id, const std::string &override_json)
+{
+ if (asset_id.isNull() || override_json.empty())
+ {
+ queueApply(obj, side, asset_id);
+ }
+ else
+ {
+ sApplyQueue.push_back({ obj->getID(), side, asset_id, nullptr, override_json });
+ }
+}
+
void LLGLTFMaterialList::queueApply(const LLViewerObject* obj, S32 side, const LLUUID& asset_id, const LLGLTFMaterial* material_override)
{
if (asset_id.isNull() || material_override == nullptr)
@@ -456,6 +468,10 @@ void LLGLTFMaterialList::flushUpdatesOnce(std::shared_ptr<CallbackHolder> callba
{
data[i]["gltf_json"] = e.override_data->asJSON();
}
+ if (!e.override_json.empty())
+ {
+ data[i]["gltf_json"] = e.override_json;
+ }
else
{
// Clear all overrides