Browse Source

Update glTF2Importer.cpp

haroonq 6 năm trước cách đây
mục cha
commit
d1af9526b1
1 tập tin đã thay đổi với 2 bổ sung3 xóa
  1. 2 3
      code/glTF2Importer.cpp

+ 2 - 3
code/glTF2Importer.cpp

@@ -788,11 +788,10 @@ aiNode* ImportNode(aiScene* pScene, glTF2::Asset& r, std::vector<unsigned int>&
     GetNodeTransform(ainode->mTransformation, node);
 
     if (!node.meshes.empty()) {
-        int mesh_idx = node.meshes[0].GetIndex();
-        int count = meshOffsets[mesh_idx + 1] - meshOffsets[mesh_idx];
         // GLTF files contain at most 1 mesh per node.
         assert(node.meshes.size() == 1);
-        assert(count == 1);
+        int mesh_idx = node.meshes[0].GetIndex();
+        int count = meshOffsets[mesh_idx + 1] - meshOffsets[mesh_idx];
 
         ainode->mNumMeshes = count;
         ainode->mMeshes = new unsigned int[count];