don't fail if a scene has no nodes property (which is not required)

This commit is contained in:
Benjamin Schmithüsen 2019-09-02 13:41:59 +02:00
parent ff51570c26
commit 6143c6662b

View File

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