summaryrefslogtreecommitdiff
path: root/indra/newview/llgltfmateriallist.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-10-14 17:36:17 -0500
committerDave Parks <davep@lindenlab.com>2022-10-14 17:36:17 -0500
commitd9d9edfa6dafa137d1c69c476872d74d33c06771 (patch)
treeca958f938c2ad6c0f09f37f3b15f5ae2b7e9c7a6 /indra/newview/llgltfmateriallist.cpp
parentf6762c3de57434730a2cbf6d0241bf1db5c9346c (diff)
parent531d38ba1d030d85ec12e1206b3de3c6cb082a9a (diff)
Merge branch 'DRTVWR-559' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview/llgltfmateriallist.cpp')
-rw-r--r--indra/newview/llgltfmateriallist.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp
index a5d2be2d4e..24fd623231 100644
--- a/indra/newview/llgltfmateriallist.cpp
+++ b/indra/newview/llgltfmateriallist.cpp
@@ -28,13 +28,36 @@
#include "llgltfmateriallist.h"
#include "llassetstorage.h"
+#include "lldispatcher.h"
#include "llfilesystem.h"
#include "llsdserialize.h"
#include "lltinygltfhelper.h"
+#include "llviewergenericmessage.h"
#include "tinygltf/tiny_gltf.h"
#include <strstream>
+namespace
+{
+ class LLGLTFOverrideDispatchHandler : public LLDispatchHandler
+ {
+ public:
+ LLGLTFOverrideDispatchHandler() = default;
+ ~LLGLTFOverrideDispatchHandler() override = default;
+
+ bool operator()(const LLDispatcher* dispatcher, const std::string& key, const LLUUID& invoice, const sparam_t& strings) override
+ {
+ LL_DEBUGS() << "strings: ";
+ for (std::string const & s : strings) {
+ LL_CONT << " " << s;
+ }
+ LL_CONT << LL_ENDL;
+ return true;
+ }
+ };
+ LLGLTFOverrideDispatchHandler handle_gltf_override_message;
+}
+
LLGLTFMaterialList gGLTFMaterialList;
LLGLTFMaterial* LLGLTFMaterialList::getMaterial(const LLUUID& id)
@@ -119,3 +142,8 @@ void LLGLTFMaterialList::removeMaterial(const LLUUID& id)
mList.erase(id);
}
+// static
+void LLGLTFMaterialList::registerCallbacks()
+{
+ gGenericDispatcher.addHandler("GLTF", &handle_gltf_override_message);
+}