Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2011-01-11 02:31:14 +0300
committerNathan Letwory <nathan@letworyinteractive.com>2011-01-11 02:31:14 +0300
commitdbb67b4d4c90e80810168a5938b4d9840dfccbbf (patch)
treef803227092c41cb8c368807f673b9782bae6a36b
parentac4eb52abfafe1ca44dbaa1f20b356e272a3daf9 (diff)
Fix [#25575] Collada import problem with Maya2010 exported collada files
Reported by Morten Mikkelsen It seems that the maya export may generate invalid joint UIDs. Skip these joints to prevent crash.
-rw-r--r--source/blender/collada/SkinInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/collada/SkinInfo.cpp b/source/blender/collada/SkinInfo.cpp
index 97d12f10c05..8d342daf486 100644
--- a/source/blender/collada/SkinInfo.cpp
+++ b/source/blender/collada/SkinInfo.cpp
@@ -241,7 +241,11 @@ void SkinInfo::link_armature(bContext *C, Object *ob, std::map<COLLADAFW::Unique
for (it = joint_data.begin(), joint_index = 0; it != joint_data.end(); it++, joint_index++) {
const char *name = "Group";
+ // skip joints that have invalid UID
+ if ((*it).joint_uid == COLLADAFW::UniqueId::INVALID) continue;
+
// name group by joint node name
+
if (joint_by_uid.find((*it).joint_uid) != joint_by_uid.end()) {
name = bc_get_joint_name(joint_by_uid[(*it).joint_uid]);
}