diff options
author | RunitaiLinden <davep@lindenlab.com> | 2024-05-01 09:51:32 -0500 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2024-05-01 09:51:32 -0500 |
commit | a701cce8e0959503156a010683f6d0d57beaae36 (patch) | |
tree | c9a3850ea63474f83fe2150fb71fb798ad71d001 /indra/newview/llviewerobject.cpp | |
parent | 170765fd3505410dced83b342f87030fd9151e35 (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/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 5b21040a04..cc6f4403dd 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -107,6 +107,7 @@ #include "llmeshrepository.h" #include "llgltfmateriallist.h" #include "llgl.h" +#include "gltf/asset.h" //#define DEBUG_UPDATE_TYPE @@ -4420,7 +4421,7 @@ LLMatrix4a LLViewerObject::getGLTFNodeTransformAgent(S32 node_index) const { LLMatrix4a mat; - if (mGLTFAsset.notNull() && node_index >= 0 && node_index < mGLTFAsset->mNodes.size()) + if (mGLTFAsset && node_index >= 0 && node_index < mGLTFAsset->mNodes.size()) { auto& node = mGLTFAsset->mNodes[node_index]; @@ -4474,7 +4475,7 @@ void decomposeMatrix(const LLMatrix4a& mat, LLVector3& position, LLQuaternion& r void LLViewerObject::setGLTFNodeRotationAgent(S32 node_index, const LLQuaternion& rotation) { - if (mGLTFAsset.notNull() && node_index >= 0 && node_index < mGLTFAsset->mNodes.size()) + if (mGLTFAsset && node_index >= 0 && node_index < mGLTFAsset->mNodes.size()) { auto& node = mGLTFAsset->mNodes[node_index]; @@ -4506,7 +4507,7 @@ void LLViewerObject::setGLTFNodeRotationAgent(S32 node_index, const LLQuaternion void LLViewerObject::moveGLTFNode(S32 node_index, const LLVector3& offset) { - if (mGLTFAsset.notNull() && node_index >= 0 && node_index < mGLTFAsset->mNodes.size()) + if (mGLTFAsset && node_index >= 0 && node_index < mGLTFAsset->mNodes.size()) { auto& node = mGLTFAsset->mNodes[node_index]; |