diff options
author | Jonathan "Geenz" Goodman <geenz@lindenlab.com> | 2025-08-29 12:48:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-29 12:48:44 -0400 |
commit | 842ac1e1503e41662c924289905b43b336b52a53 (patch) | |
tree | d8067fc99f6c699e3d15510c8521a32102f5cb30 /indra/newview/llselectmgr.cpp | |
parent | 28678996ceaea019aafaa26911a440769320c498 (diff) | |
parent | 787b63f4c29f6ef56f355ec80084458a1bbcfb35 (diff) |
Merge pull request #4379 from secondlife/release/2025.06
Release/2025.06
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r-- | indra/newview/llselectmgr.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 8aa3693d60..01fd5ae63c 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -252,6 +252,7 @@ LLSelectMgr::LLSelectMgr() LLSelectMgr::~LLSelectMgr() { clearSelections(); + mSlectionLodModChangedConnection.disconnect(); } void LLSelectMgr::clearSelections() @@ -2248,6 +2249,7 @@ void LLSelectMgr::selectionRevertGLTFMaterials() { // Restore base material LLUUID asset_id = nodep->mSavedGLTFMaterialIds[te]; + LLUUID old_asset_id = objectp->getRenderMaterialID(te); // Update material locally objectp->setRenderMaterialID(te, asset_id, false /*wait for LLGLTFMaterialList update*/); @@ -2258,18 +2260,29 @@ void LLSelectMgr::selectionRevertGLTFMaterials() objectp->setTEGLTFMaterialOverride(te, material); } - // Enqueue update to server - if (asset_id.notNull() && material) + if (asset_id.isNull() || !material) + { + //blank override out + LLGLTFMaterialList::queueApply(objectp, te, asset_id); + } + if (old_asset_id != asset_id) { // Restore overrides and base material + // Note: might not work reliably if asset is already there, might + // have a server sided problem where servers applies override + // first then resets it by adding asset, in which case need + // to create a server ticket and chain asset then override + // application. LLGLTFMaterialList::queueApply(objectp, te, asset_id, material); } else { - //blank override out - LLGLTFMaterialList::queueApply(objectp, te, asset_id); + // Enqueue override update to server + // Note: this is suboptimal, better to send asset id as well + // but there seems to be a server problem with queueApply + // that ignores override in some cases + LLGLTFMaterialList::queueModify(objectp, te, material); } - } return true; } |