Skip to content

Commit d342aa7

Browse files
committed
#4080 Rigged mesh support #3
1 parent b423900 commit d342aa7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

indra/newview/gltf/llgltfloader.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,13 @@ bool LLGLTFLoader::populateModelFromMesh(LLModel* pModel, const LL::GLTF::Mesh&
690690
LL_INFOS("GLTF_DEBUG") << "mAlternateBindMatrix name: " << legal_name << " val: " << original_joint_transform << LL_ENDL;
691691
skin_info.mAlternateBindMatrix.push_back(LLMatrix4a(original_joint_transform));
692692
}
693+
else
694+
{
695+
// For gltf mInverseBindMatrices are optional, but not for viewer
696+
// todo: get a model that triggers this
697+
skin_info.mInvBindMatrix.push_back(LLMatrix4a(mJointList[legal_name])); // might need to be an 'identity'
698+
skin_info.mAlternateBindMatrix.push_back(LLMatrix4a(mJointList[legal_name]));
699+
}
693700
}
694701

695702
// "Bind Shape Matrix" is supposed to transform the geometry of the skinned mesh

0 commit comments

Comments
 (0)