From c1180f1cc7370d2ff3acb37d6f6fac08f500661b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 7 Nov 2022 18:02:34 +0200 Subject: SL-18583 Fix race condition when setting multiple faces And fix cases of updates not applying --- indra/newview/llpanelface.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview/llpanelface.cpp') diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 06f69e6fb5..ab6d4dc1d6 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -4374,10 +4374,26 @@ void LLPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te) if (te_data["te"].has("pbr")) { objectp->setRenderMaterialID(te, te_data["te"]["pbr"].asUUID(), false); + + // todo: provide copied overrides here + LLCoros::instance().launch("modifyMaterialCoro", + std::bind(&LLGLTFMaterialList::modifyMaterialCoro, + gAgent.getRegionCapability("ModifyMaterialParams"), + llsd::map( + "object_id", objectp->getID(), + "side", te), nullptr)); } else { objectp->setRenderMaterialID(te, LLUUID::null, false); + + // blank out any override data on the server + LLCoros::instance().launch("modifyMaterialCoro", + std::bind(&LLGLTFMaterialList::modifyMaterialCoro, + gAgent.getRegionCapability("ModifyMaterialParams"), + llsd::map( + "object_id", objectp->getID(), + "side", te), nullptr)); } // Texture map -- cgit v1.2.3