Update glTF2Importer.cpp

pull/2191/head
haroonq 2018-11-01 10:52:39 -07:00 committed by GitHub
parent e205399052
commit d1af9526b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -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];