summaryrefslogtreecommitdiff
path: root/tools/collada
diff options
context:
space:
mode:
Diffstat (limited to 'tools/collada')
-rw-r--r--tools/collada/SCsub2
-rw-r--r--tools/collada/collada.cpp10
-rw-r--r--tools/collada/collada.h20
3 files changed, 24 insertions, 8 deletions
diff --git a/tools/collada/SCsub b/tools/collada/SCsub
index c8eaa596d1..34524f10ef 100644
--- a/tools/collada/SCsub
+++ b/tools/collada/SCsub
@@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.tool_sources,"*.cpp")
Export('env')
-
-
diff --git a/tools/collada/collada.cpp b/tools/collada/collada.cpp
index 97e9f5c36d..deec5f60c7 100644
--- a/tools/collada/collada.cpp
+++ b/tools/collada/collada.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2015 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 */
@@ -817,7 +817,7 @@ void Collada::_parse_camera(XMLParser& parser) {
if (name=="perspective") {
camera.mode=CameraData::MODE_PERSPECTIVE;
- } else if (name=="orthogonal") {
+ } else if (name=="orthographic") {
camera.mode=CameraData::MODE_ORTHOGONAL;
} else if (name=="xfov") {
@@ -979,7 +979,7 @@ void Collada::_parse_curve_geometry(XMLParser& parser,String p_id,String p_name)
current_source=id;
COLLADA_PRINT("source data: "+id);
- } else if (section=="float_array" || section=="array" || section=="float_array") {
+ } else if (section=="float_array" || section=="array") {
// create a new array and read it.
if (curvedata.sources.has(current_source)) {
@@ -2054,8 +2054,8 @@ void Collada::_parse_animation(XMLParser& parser) {
}
if (target.find("/")!=-1) { //transform component
- track.target=target.get_slice("/",0);
- track.param=target.get_slice("/",1);
+ track.target=target.get_slicec('/',0);
+ track.param=target.get_slicec('/',1);
if (track.param.find(".")!=-1)
track.component=track.param.get_slice(".",1).to_upper();
track.param=track.param.get_slice(".",0);
diff --git a/tools/collada/collada.h b/tools/collada/collada.h
index f523d24e02..81f51a1f3d 100644
--- a/tools/collada/collada.h
+++ b/tools/collada/collada.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2015 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 */
@@ -337,6 +337,24 @@ public:
if(normal==p_vert.normal) {
if(uv==p_vert.uv) {
if(uv2==p_vert.uv2) {
+
+ if (!weights.empty() || !p_vert.weights.empty()) {
+
+ if (weights.size()==p_vert.weights.size()) {
+
+ for(int i=0;i<weights.size();i++) {
+ if (weights[i].bone_idx!=p_vert.weights[i].bone_idx)
+ return weights[i].bone_idx<p_vert.weights[i].bone_idx;
+
+ if (weights[i].weight!=p_vert.weights[i].weight)
+ return weights[i].weight<p_vert.weights[i].weight;
+ }
+ } else {
+ return weights.size() < p_vert.weights.size();
+ }
+
+ }
+
return (color<p_vert.color);
} else
return (uv2<p_vert.uv2);