Properly clear the model before loading

This commit is contained in:
Thomas Gamper 2024-07-04 11:35:13 +02:00
parent 143ff45b61
commit fb58f88a4e

View File

@ -6108,16 +6108,8 @@ bool TinyGLTF::LoadFromString(Model *model, std::string *err, std::string *warn,
}
}
model->buffers.clear();
model->bufferViews.clear();
model->accessors.clear();
model->meshes.clear();
model->cameras.clear();
model->nodes.clear();
model->extensionsUsed.clear();
model->extensionsRequired.clear();
model->extensions.clear();
model->defaultScene = -1;
// Reset the model
(*model) = Model();
// 1. Parse Asset
{