diff options
author | Cosmic Linden <cosmic@lindenlab.com> | 2022-12-13 10:41:21 -0800 |
---|---|---|
committer | Cosmic Linden <cosmic@lindenlab.com> | 2023-01-10 17:09:30 -0800 |
commit | 693925ef23ef41e3927a9654a7f423d0e24ce19a (patch) | |
tree | f04b58860de9c0af845185123a1271edd9bc0482 /indra/newview/llselectmgr.cpp | |
parent | 4fa77b6f728b6be3d2e7fc74dda97b835476f797 (diff) |
SL-18820: Fix applying material clearing transform overrides. Loosen some asserts to allow non-default transform overrides.
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r-- | indra/newview/llselectmgr.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 4a69eba4d3..cb1e46068e 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1806,11 +1806,9 @@ void LLObjectSelection::applyNoCopyPbrMaterialToTEs(LLViewerInventoryItem* item) } // apply texture for the selected faces + // blank out most override data on the server //add(LLStatViewer::EDIT_TEXTURE, 1); - object->setRenderMaterialID(te, asset_id, false /*will be sent later*/); - - // blank out any override data on the server - LLGLTFMaterialList::queueApply(object->getID(), te, asset_id); + object->setRenderMaterialID(te, asset_id); } } } @@ -1949,10 +1947,8 @@ void LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id) objectp->setParameterEntryInUse(LLNetworkData::PARAMS_RENDER_MATERIAL, TRUE, false /*prevent an update*/); } - objectp->setRenderMaterialID(te, asset_id, false /*prevent an update to prevent a race condition*/); - - // blank out any override data on the server - LLGLTFMaterialList::queueApply(objectp->getID(), te, asset_id); + // Blank out most override data on the object and send to server + objectp->setRenderMaterialID(te, asset_id); return true; } @@ -2223,17 +2219,12 @@ void LLSelectMgr::selectionRevertGLTFMaterials() && asset_id.notNull()) { // Restore overrides - LLSD overrides; - overrides["object_id"] = objectp->getID(); - overrides["side"] = te; - - overrides["gltf_json"] = nodep->mSavedGLTFOverrideMaterials[te]->asJSON(); - LLGLTFMaterialList::queueUpdate(overrides); + LLGLTFMaterialList::queueModify(objectp->getID(), te, nodep->mSavedGLTFOverrideMaterials[te]); } else { //blank override out - LLGLTFMaterialList::queueApply(objectp->getID(), te, asset_id); + LLGLTFMaterialList::queueApply(objectp, te, asset_id); } } |