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.
This commit is contained in:
Nathan Letwory
2011-01-10 23:31:14 +00:00
parent ac4eb52abf
commit dbb67b4d4c

View File

@@ -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]);
}