Explorar o código

Fixed invalid armature node population when there's mesh on a node with the same name as the bone

Frooxius %!s(int64=5) %!d(string=hai) anos
pai
achega
29603128f4
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      code/PostProcessing/ArmaturePopulate.cpp

+ 2 - 1
code/PostProcessing/ArmaturePopulate.cpp

@@ -150,7 +150,8 @@ void ArmaturePopulate::BuildNodeList(const aiNode *current_node,
     aiNode *child = current_node->mChildren[nodeId];
     ai_assert(child);
 
-    nodes.push_back(child);
+    if (child->mNumMeshes == 0)
+        nodes.push_back(child);
 
     BuildNodeList(child, nodes);
   }