Fixed ProcessNode to either Build armature or feed children for processing, not both
This commit is contained in:
parent
71dbf6632e
commit
3482688718
|
@ -47,16 +47,18 @@ namespace SH_COMP
|
||||||
GetMesh(*mesh, meshes.back());
|
GetMesh(*mesh, meshes.back());
|
||||||
meshes.back().name = node->mName.C_Str();
|
meshes.back().name = node->mName.C_Str();
|
||||||
}
|
}
|
||||||
else
|
else if (node->mParent != nullptr)
|
||||||
{
|
{
|
||||||
BuildArmature(node, rig);
|
BuildArmature(node, rig);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
for (auto i{ 0 }; i < node->mNumChildren; ++i)
|
for (auto i{ 0 }; i < node->mNumChildren; ++i)
|
||||||
{
|
{
|
||||||
ProcessNode(node->mChildren[i], scene, meshes, rig);
|
ProcessNode(node->mChildren[i], scene, meshes, rig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MeshCompiler::GetMesh(aiMesh const& mesh, MeshData& meshData) noexcept
|
void MeshCompiler::GetMesh(aiMesh const& mesh, MeshData& meshData) noexcept
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue