summaryrefslogtreecommitdiff
path: root/indra/newview/llmaterialeditor.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-10-26 16:08:28 -0500
committerDave Parks <davep@lindenlab.com>2022-10-26 16:08:28 -0500
commit8f47657d646c06dbba8d44497c0f81fd00730cc8 (patch)
treeeec5702e7dc4d83a8bf00c0c7a87272870fcec42 /indra/newview/llmaterialeditor.cpp
parented1e5214cefc5f0aeb630bf2fbcda9dff9ed8d61 (diff)
SL-18443 Allow nulling out of override data and implement new override message protocol.
Diffstat (limited to 'indra/newview/llmaterialeditor.cpp')
-rw-r--r--indra/newview/llmaterialeditor.cpp29
1 files changed, 1 insertions, 28 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 06705a277b..5ae16db1f6 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -1994,7 +1994,7 @@ public:
"side", te,
"gltf_json", overrides_json
);
- LLCoros::instance().launch("modifyMaterialCoro", std::bind(&LLMaterialEditor::modifyMaterialCoro, mEditor, mCapUrl, overrides));
+ LLCoros::instance().launch("modifyMaterialCoro", std::bind(&LLGLTFMaterialList::modifyMaterialCoro, mCapUrl, overrides));
}
return true;
}
@@ -2452,30 +2452,3 @@ void LLMaterialEditor::loadDefaults()
setFromGltfModel(model_in, 0, true);
}
-void LLMaterialEditor::modifyMaterialCoro(std::string cap_url, LLSD overrides)
-{
- LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("modifyMaterialCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
- LLCore::HttpHeaders::ptr_t httpHeaders;
-
- httpOpts->setFollowRedirects(true);
-
- LL_DEBUGS() << "Applying override via ModifyMaterialParams cap: " << overrides << LL_ENDL;
-
- LLSD result = httpAdapter->postAndSuspend(httpRequest, cap_url, overrides, httpOpts, httpHeaders);
-
- LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
- LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
-
- if (!status)
- {
- LL_WARNS() << "Failed to modify material." << LL_ENDL;
- }
- else if (!result["success"].asBoolean())
- {
- LL_WARNS() << "Failed to modify material: " << result["message"] << LL_ENDL;
- }
-}