diff options
Diffstat (limited to 'tools/collada')
-rw-r--r-- | tools/collada/collada.cpp | 7 | ||||
-rw-r--r-- | tools/collada/collada.h | 24 |
2 files changed, 21 insertions, 10 deletions
diff --git a/tools/collada/collada.cpp b/tools/collada/collada.cpp index 16b15426df..f2e3a0e813 100644 --- a/tools/collada/collada.cpp +++ b/tools/collada/collada.cpp @@ -443,7 +443,10 @@ Vector<String> Collada::_read_string_array(XMLParser& parser) { if (parser.get_node_type() == XMLParser::NODE_TEXT) { // parse String data String str = parser.get_node_data(); - array=str.split(" ",false); + array=str.split_spaces(); + for(int i=0;i<array.size();i++) { + print_line(itos(i)+": "+array[i]); + } } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END) @@ -2066,6 +2069,8 @@ void Collada::_parse_animation(XMLParser& parser) { track.target=target; } + print_line("TARGET: "+track.target); + state.animation_tracks.push_back(track); if (!state.referenced_tracks.has(target)) diff --git a/tools/collada/collada.h b/tools/collada/collada.h index 360f54ec05..c5e5705105 100644 --- a/tools/collada/collada.h +++ b/tools/collada/collada.h @@ -302,6 +302,7 @@ public: Vector3 uv2; Plane tangent; Color color; + int uid; struct Weight { int bone_idx; float weight; @@ -331,21 +332,26 @@ public: bool operator<(const Vertex& p_vert) const { - if (vertex==p_vert.vertex) { - if(normal==p_vert.normal) { - if(uv==p_vert.uv) { - if(uv2==p_vert.uv2) { - return (color<p_vert.color); + if (uid==p_vert.uid) { + if (vertex==p_vert.vertex) { + if(normal==p_vert.normal) { + if(uv==p_vert.uv) { + if(uv2==p_vert.uv2) { + return (color<p_vert.color); + } else + return (uv2<p_vert.uv2); } else - return (uv2<p_vert.uv2); + return (uv<p_vert.uv); } else - return (uv<p_vert.uv); + return (normal<p_vert.normal); } else - return (normal<p_vert.normal); + return vertex<p_vert.vertex; } else - return vertex<p_vert.vertex; + return uid < p_vert.uid; } + + Vertex() { uid=0; idx=0; } }; struct Node { |