diff options
author | Dave Parks <davep@lindenlab.com> | 2022-11-10 13:21:06 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-11-10 13:21:06 -0600 |
commit | 76de36c40520445d7ad77f85cd6c601942b97032 (patch) | |
tree | ef734704f7f81f1191e150e3b664fee524d4935e /indra/newview/llmaterialeditor.cpp | |
parent | d68f379786ed54dbce9dcf921ded4cccd0c5c61e (diff) |
SL-18602 Integrate queueModify/queueApply/queueUpdate into all the places that used to post to ModifyMaterialParams directly.
Diffstat (limited to 'indra/newview/llmaterialeditor.cpp')
-rw-r--r-- | indra/newview/llmaterialeditor.cpp | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index cd3f122101..a9728e26da 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -2353,11 +2353,9 @@ class LLRenderMaterialOverrideFunctor : public LLSelectedNodeFunctor public: LLRenderMaterialOverrideFunctor( LLMaterialEditor * me, - std::string const & url, const LLUUID &report_on_object_id, S32 report_on_te) : mEditor(me) - , mCapUrl(url) , mSuccess(false) , mObjectId(report_on_object_id) , mObjectTE(report_on_te) @@ -2530,34 +2528,12 @@ public: material->setAlphaCutoff(revert_mat->mAlphaCutoff, false); } -#if 1 if (mObjectTE == te && mObjectId == objectp->getID()) { mSuccess = true; } - LLGLTFMaterialList::queueModifyMaterial(objectp->getID(), te, material); -#else - - std::string overrides_json = material->asJSON(); - - LLSD overrides = llsd::map( - "object_id", objectp->getID(), - "side", te, - "gltf_json", overrides_json - ); - - void(*done_callback)(bool) = nullptr; - if (mObjectTE == te - && mObjectId == objectp->getID()) - { - mSuccess = true; - // We only want callback for face we are displayig material from - // even if we are setting all of them - done_callback = modifyCallback; - } - LLCoros::instance().launch("modifyMaterialCoro", std::bind(&LLGLTFMaterialList::modifyMaterialCoro, mCapUrl, overrides, done_callback)); -#endif + LLGLTFMaterialList::queueModify(objectp->getID(), te, material); } return true; } @@ -2576,7 +2552,6 @@ public: private: LLMaterialEditor * mEditor; - std::string mCapUrl; LLUUID mObjectId; S32 mObjectTE; bool mSuccess; @@ -2603,7 +2578,7 @@ void LLMaterialEditor::applyToSelection() { mOverrideInProgress = true; LLObjectSelectionHandle selected_objects = LLSelectMgr::getInstance()->getSelection(); - LLRenderMaterialOverrideFunctor override_func(this, url, mOverrideObjectId, mOverrideObjectTE); + LLRenderMaterialOverrideFunctor override_func(this, mOverrideObjectId, mOverrideObjectTE); selected_objects->applyToNodes(&override_func); void(*done_callback)(bool) = LLRenderMaterialOverrideFunctor::modifyCallback; |