Collada: fix scenenode parsing.

pull/2966/head
Kim Kulling 2020-09-14 21:35:36 +02:00
parent d0932c405f
commit 14d6141f69
1 changed files with 3 additions and 5 deletions

View File

@ -163,6 +163,7 @@ std::string ColladaParser::ReadZaeManifest(ZipArchiveIOSystem &zip_archive) {
if (!manifestParser.parse(manifestfile.get())) { if (!manifestParser.parse(manifestfile.get())) {
return std::string(); return std::string();
} }
XmlNode root = manifestParser.getRootNode(); XmlNode root = manifestParser.getRootNode();
const std::string &name = root.name(); const std::string &name = root.name();
if (name != "dae_root") { if (name != "dae_root") {
@ -2036,10 +2037,7 @@ void ColladaParser::ReadSceneNode(XmlNode &node, Node *pNode) {
return; return;
} }
XmlNodeIterator xmlIt(node); for (XmlNode &currentNode : node.children()) {
xmlIt.collectChildrenPreOrder(node);
XmlNode currentNode;
while (xmlIt.getNext(currentNode)) {
const std::string &currentName = currentNode.name(); const std::string &currentName = currentNode.name();
if (currentName == "node") { if (currentName == "node") {
Node *child = new Node; Node *child = new Node;