Fix [#24359] Collada: end bone zero size, mysterious extra empty

Reported by Thomas Larsson
Fix by Jeroen Bakker

Fix max length of leaf bone and remove empty.
This commit is contained in:
Nathan Letwory
2010-12-21 10:43:47 +00:00
parent 044e31b89c
commit c5077e1ede
2 changed files with 4 additions and 6 deletions

View File

@@ -200,6 +200,7 @@ void ArmatureImporter::fix_leaf_bones()
}
}
#if 0
void ArmatureImporter::set_leaf_bone_shapes(Object *ob_arm)
{
bPose *pose = ob_arm->pose;
@@ -218,7 +219,6 @@ void ArmatureImporter::set_leaf_bone_shapes(Object *ob_arm)
}
}
#if 0
void ArmatureImporter::set_euler_rotmode()
{
// just set rotmode = ROT_MODE_EUL on pose channel for each joint
@@ -373,7 +373,7 @@ void ArmatureImporter::create_armature_bones(SkinInfo& skin)
leaf_bones.clear();
totbone = 0;
// bone_direction_row = 1; // TODO: don't default to Y but use asset and based on it decide on default row
leaf_bone_length = 0.1f;
leaf_bone_length = FLT_MAX;
// min_angle = 360.0f; // minimum angle between bone head-tail and a row of bone matrix
// create bones
@@ -404,8 +404,7 @@ void ArmatureImporter::create_armature_bones(SkinInfo& skin)
ED_armature_edit_free(ob_arm);
DAG_id_tag_update(&ob_arm->id, OB_RECALC_OB|OB_RECALC_DATA);
set_leaf_bone_shapes(ob_arm);
// set_leaf_bone_shapes(ob_arm);
// set_euler_rotmode();
}

View File

@@ -105,9 +105,8 @@ private:
void fix_leaf_bones();
void set_leaf_bone_shapes(Object *ob_arm);
#if 0
void set_leaf_bone_shapes(Object *ob_arm);
void set_euler_rotmode();
#endif