diff options
author | Dave Parks <davep@lindenlab.com> | 2022-11-09 17:10:31 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-11-09 17:10:31 -0600 |
commit | 1ed8f7cd0ca41ab655aaeeaf141eb4ef20f16bd0 (patch) | |
tree | 5ef366323c8e6080fae48c8fe2b5d23bb698699e /indra/newview/llviewerobject.cpp | |
parent | 14d901f25fdc10df871a60294eefcf4b9fb00931 (diff) |
SL-18602 Fix for applying material asset not removing overrides on drag-and-drop
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 1efc4ea3d5..3cd5b1dbe7 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -7205,19 +7205,15 @@ void LLViewerObject::setRenderMaterialID(S32 te_in, const LLUUID& id, bool updat if (update_server) { - // blank out any override data on the ser + // update via ModifyMaterialParams cap (server will echo back changes) for (S32 te = start_idx; te < end_idx; ++te) { - LLCoros::instance().launch("modifyMaterialCoro", - std::bind(&LLGLTFMaterialList::modifyMaterialCoro, - gAgent.getRegionCapability("ModifyMaterialParams"), - llsd::map( - "object_id", getID(), - "side", te), nullptr)); + LLGLTFMaterialList::queueApplyMaterialAsset(getID(), te, id); } + LLGLTFMaterialList::flushUpdates(); } - // update and send LLRenderMaterialParams + // predictively update LLRenderMaterialParams (don't wait for server) LLRenderMaterialParams* param_block = (LLRenderMaterialParams*)getParameterEntry(LLNetworkData::PARAMS_RENDER_MATERIAL); if (!param_block && id.notNull()) { // block doesn't exist, but it will need to @@ -7230,18 +7226,6 @@ void LLViewerObject::setRenderMaterialID(S32 te_in, const LLUUID& id, bool updat { param_block->setMaterial(te, id); } - - if (update_server) - { - // If 'in use' changes, it will send an update itself. - bool in_use_changed = setParameterEntryInUse(LLNetworkData::PARAMS_RENDER_MATERIAL, !param_block->isEmpty(), true); - - if (!in_use_changed) - { - // In use didn't change, but the parameter did, send an update - parameterChanged(LLNetworkData::PARAMS_RENDER_MATERIAL, param_block, !param_block->isEmpty(), true); - } - } } } |