From fa39db244148911f04fd4de52425258248b8eb91 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 12 Jul 2010 11:04:51 +0000 Subject: [PATCH] 2.5: remove armature "B-Bone Rest" option, this was only added to keep broken behavior for backwards compatibility, it's been there long enough now to be removed. --- release/scripts/ui/properties_data_armature.py | 2 -- source/blender/blenkernel/intern/armature.c | 14 ++++++-------- source/blender/makesdna/DNA_armature_types.h | 2 +- source/blender/makesrna/intern/rna_armature.c | 5 ----- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/release/scripts/ui/properties_data_armature.py b/release/scripts/ui/properties_data_armature.py index 805a21b3be2..0575f13e8be 100644 --- a/release/scripts/ui/properties_data_armature.py +++ b/release/scripts/ui/properties_data_armature.py @@ -93,7 +93,6 @@ class DATA_PT_skeleton(DataButtonsPanel): if wide_ui: col = split.column() col.prop(arm, "deform_quaternion", text="Quaternion") - col.prop(arm, "deform_bbone_rest", text="B-Bones Rest") class DATA_PT_display(DataButtonsPanel): @@ -122,7 +121,6 @@ class DATA_PT_display(DataButtonsPanel): col = split.column() col.prop(arm, "draw_group_colors", text="Colors") col.prop(arm, "delay_deform", text="Delay Refresh") - col.prop(ob, "x_ray", text="X-Ray (Object)") class DATA_PT_bone_groups(DataButtonsPanel): diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index 557f3900d7b..990993b1077 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -687,11 +687,11 @@ Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest) /* ************ Armature Deform ******************* */ -static void pchan_b_bone_defmats(bPoseChannel *pchan, int use_quaternion, int rest_def) +static void pchan_b_bone_defmats(bPoseChannel *pchan, int use_quaternion) { Bone *bone= pchan->bone; Mat4 *b_bone= b_bone_spline_setup(pchan, 0); - Mat4 *b_bone_rest= (rest_def)? NULL: b_bone_spline_setup(pchan, 1); + Mat4 *b_bone_rest= b_bone_spline_setup(pchan, 1); Mat4 *b_bone_mats; DualQuat *b_bone_dual_quats= NULL; float tmat[4][4]; @@ -718,10 +718,7 @@ static void pchan_b_bone_defmats(bPoseChannel *pchan, int use_quaternion, int re unit_m4(tmat); for(a=0; asegments; a++) { - if(b_bone_rest) - invert_m4_m4(tmat, b_bone_rest[a].mat); - else - tmat[3][1] = -a*(bone->length/(float)bone->segments); + invert_m4_m4(tmat, b_bone_rest[a].mat); mul_serie_m4(b_bone_mats[a+1].mat, pchan->chan_mat, bone->arm_mat, b_bone[a].mat, tmat, b_bone_mats[0].mat, NULL, NULL, NULL); @@ -919,7 +916,6 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float obinv[4][4], premat[4][4], postmat[4][4]; int use_envelope = deformflag & ARM_DEF_ENVELOPE; int use_quaternion = deformflag & ARM_DEF_QUATERNION; - int bbone_rest_def = deformflag & ARM_DEF_B_BONE_REST; int invert_vgroup= deformflag & ARM_DEF_INVERT_VGROUP; int numGroups = 0; /* safety for vertexgroup index overflow */ int i, target_totvert = 0; /* safety for vertexgroup overflow */ @@ -946,7 +942,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, for(pchan = armOb->pose->chanbase.first; pchan; pchan = pchan->next) { if(!(pchan->bone->flag & BONE_NO_DEFORM)) { if(pchan->bone->segments > 1) - pchan_b_bone_defmats(pchan, use_quaternion, bbone_rest_def); + pchan_b_bone_defmats(pchan, use_quaternion); if(use_quaternion) { pchan->dual_quat= &dualquats[totchan++]; @@ -1701,6 +1697,8 @@ void armature_rebuild_pose(Object *ob, bArmature *arm) ob->pose->flag &= ~POSE_RECALC; ob->pose->flag |= POSE_WAS_REBUILT; + + make_pose_channels_hash(ob->pose); } diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 258646f0e55..f7533ff9bde 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -134,7 +134,7 @@ typedef enum eArmature_DeformFlag { ARM_DEF_VGROUP = (1<<0), ARM_DEF_ENVELOPE = (1<<1), ARM_DEF_QUATERNION = (1<<2), - ARM_DEF_B_BONE_REST = (1<<3), + ARM_DEF_B_BONE_REST = (1<<3), /* deprecated */ ARM_DEF_INVERT_VGROUP = (1<<4) } eArmature_DeformFlag; diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index 4b9ae691dcb..9239378f496 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -861,11 +861,6 @@ static void rna_def_armature(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Use Dual Quaternion Deformation", "Enable deform rotation with Quaternions"); RNA_def_property_update(prop, 0, "rna_Armature_update_data"); - prop= RNA_def_property(srna, "deform_bbone_rest", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_B_BONE_REST); - RNA_def_property_ui_text(prop, "B-Bones Deform in Rest Position", "Make B-Bones deform already in Rest Position"); - RNA_def_property_update(prop, 0, "rna_Armature_update_data"); - //prop= RNA_def_property(srna, "deform_invert_vertexgroups", PROP_BOOLEAN, PROP_NONE); //RNA_def_property_boolean_negative_sdna(prop, NULL, "deformflag", ARM_DEF_INVERT_VGROUP); //RNA_def_property_ui_text(prop, "Invert Vertex Group Influence", "Invert Vertex Group influence (only for Modifiers)");