summaryrefslogtreecommitdiff
path: root/indra/newview/gltf
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2024-05-01 09:51:32 -0500
committerRunitaiLinden <davep@lindenlab.com>2024-05-01 09:51:32 -0500
commita701cce8e0959503156a010683f6d0d57beaae36 (patch)
treec9a3850ea63474f83fe2150fb71fb798ad71d001 /indra/newview/gltf
parent170765fd3505410dced83b342f87030fd9151e35 (diff)
#1357 Preserve asset "extras" and switch to std::shared_ptr for referencing Asset from LLViewerObject to cut down rebuild time
Diffstat (limited to 'indra/newview/gltf')
-rw-r--r--indra/newview/gltf/asset.cpp6
-rw-r--r--indra/newview/gltf/asset.h4
2 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp
index 475cbcb6e5..42f064699c 100644
--- a/indra/newview/gltf/asset.cpp
+++ b/indra/newview/gltf/asset.cpp
@@ -34,8 +34,6 @@
using namespace LL::GLTF;
-#pragma optimize("", off)
-
namespace LL
{
namespace GLTF
@@ -280,6 +278,7 @@ namespace LL
dst.asset.version = src.mVersion;
dst.asset.minVersion = src.mMinVersion;
dst.asset.generator = "Linden Lab Experimental GLTF Export";
+ dst.asset.extras = src.mExtras;
copy(src.mScenes, dst.scenes);
copy(src.mNodes, dst.nodes);
@@ -739,9 +738,10 @@ const Asset& Asset::operator=(const tinygltf::Model& src)
mMinVersion = src.asset.minVersion;
mGenerator = src.asset.generator;
mCopyright = src.asset.copyright;
+ mExtras = src.asset.extras;
mDefaultScene = src.defaultScene;
-
+
mScenes.resize(src.scenes.size());
for (U32 i = 0; i < src.scenes.size(); ++i)
diff --git a/indra/newview/gltf/asset.h b/indra/newview/gltf/asset.h
index cb28c4a572..5a62313705 100644
--- a/indra/newview/gltf/asset.h
+++ b/indra/newview/gltf/asset.h
@@ -265,7 +265,7 @@ namespace LL
};
// C++ representation of a GLTF Asset
- class Asset : public LLRefCount
+ class Asset
{
public:
std::vector<Scene> mScenes;
@@ -287,6 +287,8 @@ namespace LL
std::string mCopyright;
S32 mDefaultScene = INVALID_INDEX;
+ tinygltf::Value mExtras;
+
// the last time update() was called according to gFrameTimeSeconds
F32 mLastUpdateTime = gFrameTimeSeconds;