diff --git a/code/glTF/glTFImporter.cpp b/code/glTF/glTFImporter.cpp index 9e31bdccd..146d7453e 100644 --- a/code/glTF/glTFImporter.cpp +++ b/code/glTF/glTFImporter.cpp @@ -713,7 +713,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; diff --git a/code/glTF2/glTF2Importer.cpp b/code/glTF2/glTF2Importer.cpp index cf9625b9c..a2b18fc49 100644 --- a/code/glTF2/glTF2Importer.cpp +++ b/code/glTF2/glTF2Importer.cpp @@ -1128,7 +1128,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;