Merge pull request #200 from ux3d/feature/allow-scenes-without-nodes

allow scenes without nodes
This commit is contained in:
Syoyo Fujita 2019-09-02 22:12:15 +09:00 committed by GitHub
commit 67aa2ca75e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4563,9 +4563,7 @@ bool TinyGLTF::LoadFromString(Model *model, std::string *err, std::string *warn,
}
const json &o = it->get<json>();
std::vector<int> nodes;
if (!ParseIntegerArrayProperty(&nodes, err, o, "nodes", false)) {
return false;
}
ParseIntegerArrayProperty(&nodes, err, o, "nodes", false);
Scene scene;
scene.nodes = std::move(nodes);