[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56212] trunk/blender/source/blender/ collada/SkinInfo.cpp: Fix part of #34746: crash importing certain collada files with armatures.
Brecht Van Lommel
brechtvanlommel at pandora.be
Mon Apr 22 17:49:19 CEST 2013
Revision: 56212
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56212
Author: blendix
Date: 2013-04-22 15:49:15 +0000 (Mon, 22 Apr 2013)
Log Message:
-----------
Fix part of #34746: crash importing certain collada files with armatures. It still
imports the armature wrong though.
Modified Paths:
--------------
trunk/blender/source/blender/collada/SkinInfo.cpp
Modified: trunk/blender/source/blender/collada/SkinInfo.cpp
===================================================================
--- trunk/blender/source/blender/collada/SkinInfo.cpp 2013-04-22 15:13:47 UTC (rev 56211)
+++ trunk/blender/source/blender/collada/SkinInfo.cpp 2013-04-22 15:49:15 UTC (rev 56212)
@@ -316,12 +316,15 @@
std::vector<JointData>::iterator ji;
//for each joint_data in this skin
for (ji = joint_data.begin(); ji != joint_data.end(); ji++) {
- //get joint node from joint map
- COLLADAFW::Node *joint = joint_by_uid[(*ji).joint_uid];
- //find if joint node is in the tree belonging to the root_joint
- if (find_node_in_tree(joint, root)) {
- if (std::find(result.begin(), result.end(), root) == result.end())
- result.push_back(root);
+ if (joint_by_uid.find((*ji).joint_uid) != joint_by_uid.end()) {
+ //get joint node from joint map
+ COLLADAFW::Node *joint = joint_by_uid[(*ji).joint_uid];
+
+ //find if joint node is in the tree belonging to the root_joint
+ if (find_node_in_tree(joint, root)) {
+ if (std::find(result.begin(), result.end(), root) == result.end())
+ result.push_back(root);
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list