fix: dumping xmodels with multiple surfaces and no bones

This commit is contained in:
Jan 2025-05-11 20:55:52 +01:00
parent c28d1f6000
commit 2a4c0dcb43
No known key found for this signature in database
GPG Key ID: 44B581F78FF5C57C

View File

@ -121,6 +121,7 @@ namespace
for (auto meshIndex = 0u; meshIndex < meshCount; meshIndex++) for (auto meshIndex = 0u; meshIndex < meshCount; meshIndex++)
rootNode.children->push_back(m_first_mesh_node + meshIndex); rootNode.children->push_back(m_first_mesh_node + meshIndex);
if (!xmodel.m_bones.empty())
rootNode.children->push_back(m_first_bone_node); rootNode.children->push_back(m_first_bone_node);
m_root_node = static_cast<unsigned>(gltf.nodes->size()); m_root_node = static_cast<unsigned>(gltf.nodes->size());