summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-05-26 17:31:37 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-05-26 17:43:12 +0300
commitd342aa79c24fe20d06a018eabdb03912d11d4702 (patch)
tree0463aff9c50bd9b688e009348acbf4ea96c09fc6 /indra/newview
parentb423900792aca2e094fac85f9aeb34b26f9c2109 (diff)
#4080 Rigged mesh support #3
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/gltf/llgltfloader.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/gltf/llgltfloader.cpp b/indra/newview/gltf/llgltfloader.cpp
index 17f52af6b1..de7c341cdf 100644
--- a/indra/newview/gltf/llgltfloader.cpp
+++ b/indra/newview/gltf/llgltfloader.cpp
@@ -690,6 +690,13 @@ bool LLGLTFLoader::populateModelFromMesh(LLModel* pModel, const LL::GLTF::Mesh&
LL_INFOS("GLTF_DEBUG") << "mAlternateBindMatrix name: " << legal_name << " val: " << original_joint_transform << LL_ENDL;
skin_info.mAlternateBindMatrix.push_back(LLMatrix4a(original_joint_transform));
}
+ else
+ {
+ // For gltf mInverseBindMatrices are optional, but not for viewer
+ // todo: get a model that triggers this
+ skin_info.mInvBindMatrix.push_back(LLMatrix4a(mJointList[legal_name])); // might need to be an 'identity'
+ skin_info.mAlternateBindMatrix.push_back(LLMatrix4a(mJointList[legal_name]));
+ }
}
// "Bind Shape Matrix" is supposed to transform the geometry of the skinned mesh