diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2013-02-12 00:21:10 +0400 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2013-02-12 00:21:10 +0400 |
commit | 3dfd736d456c79d8ab7c517e68e990040555d223 (patch) | |
tree | 5afbdf1b78509e9af8787d5ffcef59f8aa843bed | |
parent | b063bdbb5ff78b484d60f5ac517d126c244f0235 (diff) |
Fix: Collada Import of armatures only added the root bone
-rw-r--r-- | source/blender/collada/DocumentImporter.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index 88a67eebe9d..52dd587231d 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -583,11 +583,16 @@ std::vector<Object *> *DocumentImporter::write_node(COLLADAFW::Node *node, COLLA } // if node has child nodes write them COLLADAFW::NodePointerArray &child_nodes = node->getChildNodes(); + if (objects_done->size() > 0) { ob = *objects_done->begin(); - for (unsigned int i = 0; i < child_nodes.getCount(); i++) { - write_node(child_nodes[i], node, sce, ob, is_library_node); - } + } + else { + ob = NULL; + } + + for (unsigned int i = 0; i < child_nodes.getCount(); i++) { + write_node(child_nodes[i], node, sce, ob, is_library_node); } return objects_done; |