summaryrefslogtreecommitdiff
path: root/tools/collada
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-03-03 14:39:13 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-03-03 14:39:13 -0300
commit4d2198110b4af7f203eeef95697255569e49bce7 (patch)
tree452e4964f127643bf52610718fd956d8b55ed6ba /tools/collada
parent91faf8e21810c8995e4f6e3b6ba47a6482ab877e (diff)
merges from okam repo
Diffstat (limited to 'tools/collada')
-rw-r--r--tools/collada/collada.cpp2
-rw-r--r--tools/collada/collada.h18
2 files changed, 19 insertions, 1 deletions
diff --git a/tools/collada/collada.cpp b/tools/collada/collada.cpp
index 97e9f5c36d..b55edde801 100644
--- a/tools/collada/collada.cpp
+++ b/tools/collada/collada.cpp
@@ -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") {
diff --git a/tools/collada/collada.h b/tools/collada/collada.h
index f523d24e02..7691d90c0a 100644
--- a/tools/collada/collada.h
+++ b/tools/collada/collada.h
@@ -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);