summaryrefslogtreecommitdiff
path: root/tools/collada/collada.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/collada/collada.cpp')
-rw-r--r--tools/collada/collada.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/collada/collada.cpp b/tools/collada/collada.cpp
index deec5f60c7..07da72718e 100644
--- a/tools/collada/collada.cpp
+++ b/tools/collada/collada.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -1683,8 +1683,12 @@ Collada::Node* Collada::_parse_visual_scene_node(XMLParser& parser) {
if ( parser.has_attribute("sid") ) { //bones may not have sid
joint->sid=parser.get_attribute_value("sid");
// state.bone_map[joint->sid]=joint;
- } else if (state.idref_joints.has(name))
+ } else if (state.idref_joints.has(name)) {
joint->sid=name; //kind of a cheat but..
+ } else if (parser.has_attribute("name")) {
+ joint->sid=parser.get_attribute_value_safe("name");
+ }
+
if (joint->sid!="") {
state.sid_to_node_map[joint->sid]=id;