summaryrefslogtreecommitdiff
path: root/indra/newview/llmaterialeditor.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-11-08 12:20:59 -0600
committerDave Parks <davep@lindenlab.com>2022-11-08 12:20:59 -0600
commit40d01ba39388c5400e2582145e77295c51f33fc3 (patch)
treeaadf2694c8f67926ef14e710fdc23d9595644b85 /indra/newview/llmaterialeditor.cpp
parenta0c7a7ecdc7b9fb53fa1175babf0d8497a3e9112 (diff)
SL-18585 Batch updates to ModifyMaterialParams capability.
Diffstat (limited to 'indra/newview/llmaterialeditor.cpp')
-rw-r--r--indra/newview/llmaterialeditor.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 397a302069..749b5a4c1b 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -2275,14 +2275,16 @@ public:
material->setAlphaCutoff(mEditor->getAlphaCutoff(), true);
}
- std::string overrides_json = material->asJSON();
-
#if 1
- // debug
- std::string err, warn;
- LLGLTFMaterial debug;
- debug.fromJSON(overrides_json, warn, err);
-#endif
+ 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(),
@@ -2300,6 +2302,7 @@ public:
done_callback = modifyCallback;
}
LLCoros::instance().launch("modifyMaterialCoro", std::bind(&LLGLTFMaterialList::modifyMaterialCoro, mCapUrl, overrides, done_callback));
+#endif
}
return true;
}
@@ -2347,6 +2350,11 @@ void LLMaterialEditor::applyToSelection()
LLObjectSelectionHandle selected_objects = LLSelectMgr::getInstance()->getSelection();
LLRenderMaterialOverrideFunctor override_func(this, url, mOverrideObjectId, mOverrideObjectTE);
selected_objects->applyToTEs(&override_func);
+
+ void(*done_callback)(bool) = LLRenderMaterialOverrideFunctor::modifyCallback;
+
+ LLGLTFMaterialList::flushModifyMaterialQueue(done_callback);
+
if (!override_func.getResult())
{
// OverrideFunctor didn't find expected object or face