From d04df3e7c52e5566c30875236567a1656b365d9f Mon Sep 17 00:00:00 2001 From: Inho Lee Date: Fri, 14 Feb 2020 08:41:55 +0100 Subject: [PATCH] A bug when importing multiple gltf files meshOffsets are not cleared when importing multiple gltf files --- code/glTF/glTFImporter.cpp | 1 + code/glTF2/glTF2Importer.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/code/glTF/glTFImporter.cpp b/code/glTF/glTFImporter.cpp index 16addc977..b410e1002 100644 --- a/code/glTF/glTFImporter.cpp +++ b/code/glTF/glTFImporter.cpp @@ -222,6 +222,7 @@ void glTFImporter::ImportMeshes(glTF::Asset& r) std::vector meshes; unsigned int k = 0; + meshOffsets.clear(); for (unsigned int m = 0; m < r.meshes.Size(); ++m) { Mesh& mesh = r.meshes[m]; diff --git a/code/glTF2/glTF2Importer.cpp b/code/glTF2/glTF2Importer.cpp index af98076a7..7a0a92d7c 100644 --- a/code/glTF2/glTF2Importer.cpp +++ b/code/glTF2/glTF2Importer.cpp @@ -335,6 +335,7 @@ void glTF2Importer::ImportMeshes(glTF2::Asset &r) { std::vector meshes; unsigned int k = 0; + meshOffsets.clear(); for (unsigned int m = 0; m < r.meshes.Size(); ++m) { Mesh &mesh = r.meshes[m];