Merge pull request #3009 from inhosens/master

A bug when importing multiple gltf files
pull/3024/head^2
Kim Kulling 2020-02-24 20:05:19 +01:00 committed by GitHub
commit 824a412239
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -222,6 +222,7 @@ void glTFImporter::ImportMeshes(glTF::Asset& r)
std::vector<aiMesh*> meshes; std::vector<aiMesh*> meshes;
unsigned int k = 0; unsigned int k = 0;
meshOffsets.clear();
for (unsigned int m = 0; m < r.meshes.Size(); ++m) { for (unsigned int m = 0; m < r.meshes.Size(); ++m) {
Mesh& mesh = r.meshes[m]; Mesh& mesh = r.meshes[m];

View File

@ -335,6 +335,7 @@ void glTF2Importer::ImportMeshes(glTF2::Asset &r) {
std::vector<aiMesh *> meshes; std::vector<aiMesh *> meshes;
unsigned int k = 0; unsigned int k = 0;
meshOffsets.clear();
for (unsigned int m = 0; m < r.meshes.Size(); ++m) { for (unsigned int m = 0; m < r.meshes.Size(); ++m) {
Mesh &mesh = r.meshes[m]; Mesh &mesh = r.meshes[m];