Skip to content

Commit

Permalink
Properly clear the model before loading
Browse files Browse the repository at this point in the history
  • Loading branch information
ptc-tgamper committed Jul 4, 2024
1 parent 143ff45 commit 1cc6477
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tiny_gltf.h
Original file line number Diff line number Diff line change
Expand Up @@ -6108,12 +6108,22 @@ bool TinyGLTF::LoadFromString(Model *model, std::string *err, std::string *warn,
}
}

model->accessors.clear();
model->animations.clear();
model->buffers.clear();
model->bufferViews.clear();
model->accessors.clear();
model->materials.clear();
model->meshes.clear();
model->cameras.clear();
model->nodes.clear();
model->textures.clear();
model->images.clear();
model->skins.clear();
model->samplers.clear();
model->cameras.clear();
model->scenes.clear();
model->lights.clear();
model->audioEmitters.clear();
model->audioSources.clear();
model->extensionsUsed.clear();
model->extensionsRequired.clear();
model->extensions.clear();
Expand Down

0 comments on commit 1cc6477

Please sign in to comment.