fix: collada - Connected bones get their tails set to wrong location when fix leaf nodes option is enabled

This commit is contained in:
Gaia Clary 2017-03-21 17:24:39 +01:00
parent 1978ac65c4
commit ec3989441f
1 changed files with 6 additions and 1 deletions

View File

@ -324,10 +324,15 @@ void ArmatureImporter::connect_bone_chains(bArmature *armature, Bone *parentbone
if (len_squared_v3(vec) > MINIMUM_BONE_LENGTH)
{
copy_v3_v3(pebone->tail, cebone->head);
pbe->set_tail(pebone->tail); /* to make fix_leafbone happy ...*/
if (pbe && pbe->get_chain_length() >= this->import_settings->min_chain_length) {
BoneExtended *cbe = extended_bones[cebone->name];
cbe->set_use_connect(true);
cebone->flag |= BONE_CONNECTED;
printf("Connecting chain: parent %s --> %s (child)\n", pebone->name, cebone->name);
pbe->set_leaf_bone(false);
printf("Connect Bone chain: parent (%s --> %s) child)\n", pebone->name, cebone->name);
}
}
}