diff --git a/code/glTF2Importer.cpp b/code/glTF2Importer.cpp index bb0f7ad8d..42c58adf9 100755 --- a/code/glTF2Importer.cpp +++ b/code/glTF2Importer.cpp @@ -1130,7 +1130,11 @@ void glTF2Importer::ImportEmbeddedTextures(glTF2::Asset& r) } } -void glTF2Importer::InternReadFile(const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler) { +void glTF2Importer::InternReadFile(const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler) +{ + // clean all member arrays + meshOffsets.clear(); + embeddedTexIdxs.clear(); this->mScene = pScene; diff --git a/code/glTFImporter.cpp b/code/glTFImporter.cpp index 57566b463..c9a00808c 100755 --- a/code/glTFImporter.cpp +++ b/code/glTFImporter.cpp @@ -717,7 +717,11 @@ void glTFImporter::ImportEmbeddedTextures(glTF::Asset& r) } } -void glTFImporter::InternReadFile(const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler) { +void glTFImporter::InternReadFile(const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler) +{ + // clean all member arrays + meshOffsets.clear(); + embeddedTexIdxs.clear(); this->mScene = pScene;