summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-08-14 11:17:35 +0300
committerGitHub <noreply@github.com>2025-08-14 11:17:35 +0300
commit6f072c2121fcb6f00ccc773d0ff4edc5cbfb013b (patch)
tree62c4967d6be428907691f133e794654b25c5d140 /indra/newview/llselectmgr.cpp
parent8145d99f80d55c4da88adb6909386bd5c25fd743 (diff)
parentd859557c1865b0636ce2a407d2e7b814fbfc1eb6 (diff)
Merge 2025.06 into develop
Merge 2025.06 into develop
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r--indra/newview/llselectmgr.cpp23
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;
}