From ec3fe8c2a56d92c5eff480d7f027a1b6062bb4cf Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Mon, 29 Sep 2025 23:40:41 +0300 Subject: #3189 Fix missed else condition --- indra/newview/llgltfmateriallist.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llgltfmateriallist.cpp') diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index 8da835ed7d..3e4aadc381 100644 --- a/indra/newview/llgltfmateriallist.cpp +++ b/indra/newview/llgltfmateriallist.cpp @@ -359,6 +359,7 @@ void LLGLTFMaterialList::queueApply(const LLViewerObject* obj, S32 side, const L { if (asset_id.isNull() || override_json.empty()) { + // If there is no asset, there can't be an override queueApply(obj, side, asset_id); } else @@ -371,6 +372,7 @@ void LLGLTFMaterialList::queueApply(const LLViewerObject* obj, S32 side, const L { if (asset_id.isNull() || material_override == nullptr) { + // If there is no asset, there can't be an override queueApply(obj, side, asset_id); } else @@ -470,7 +472,7 @@ void LLGLTFMaterialList::flushUpdatesOnce(std::shared_ptr callba { data[i]["gltf_json"] = e.override_data->asJSON(); } - if (!e.override_json.empty()) + else if (!e.override_json.empty()) { data[i]["gltf_json"] = e.override_json; } -- cgit v1.2.3 From 5fe152cfea87c04c1edf2caa7d419a056a7916a2 Mon Sep 17 00:00:00 2001 From: Aqil Ahmad Date: Mon, 6 Oct 2025 18:52:33 +0500 Subject: Fix #4195: Preserve transforms when switching PBR materials (#4725) Fixes texture transforms being reset when switching from Blinn-Phong to PBR materials and between PBR. Previously, custom scale, offset, and rotation settings would be lost, making it tedious to switch between PBR materials. --- indra/newview/llgltfmateriallist.cpp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'indra/newview/llgltfmateriallist.cpp') diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index 3e4aadc381..64b6d20cd6 100644 --- a/indra/newview/llgltfmateriallist.cpp +++ b/indra/newview/llgltfmateriallist.cpp @@ -380,17 +380,6 @@ void LLGLTFMaterialList::queueApply(const LLViewerObject* obj, S32 side, const L LLGLTFMaterial* material = new LLGLTFMaterial(*material_override); sApplyQueue.push_back({ obj->getID(), side, asset_id, material }); } - - if (sUpdates.size() >= MAX_TASK_UPDATES) - { - LLCoros::instance().launch("modifyMaterialCoro", - std::bind(&LLGLTFMaterialList::modifyMaterialCoro, - gAgent.getRegionCapability("ModifyMaterialParams"), - sUpdates, - std::shared_ptr(nullptr))); - - sUpdates = LLSD::emptyArray(); - } } void LLGLTFMaterialList::queueUpdate(const LLSD& data) -- cgit v1.2.3 From 9c28607a7c787b8ee623da76ef3a4861d612316e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Mon, 6 Oct 2025 16:54:17 +0300 Subject: #4195 Clear code from a merge conflict This part was removed unintentionally, due to a merge conflict resolution. --- indra/newview/llgltfmateriallist.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/llgltfmateriallist.cpp') diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index 64b6d20cd6..3e4aadc381 100644 --- a/indra/newview/llgltfmateriallist.cpp +++ b/indra/newview/llgltfmateriallist.cpp @@ -380,6 +380,17 @@ void LLGLTFMaterialList::queueApply(const LLViewerObject* obj, S32 side, const L LLGLTFMaterial* material = new LLGLTFMaterial(*material_override); sApplyQueue.push_back({ obj->getID(), side, asset_id, material }); } + + if (sUpdates.size() >= MAX_TASK_UPDATES) + { + LLCoros::instance().launch("modifyMaterialCoro", + std::bind(&LLGLTFMaterialList::modifyMaterialCoro, + gAgent.getRegionCapability("ModifyMaterialParams"), + sUpdates, + std::shared_ptr(nullptr))); + + sUpdates = LLSD::emptyArray(); + } } void LLGLTFMaterialList::queueUpdate(const LLSD& data) -- cgit v1.2.3