forked from bartvdbraak/blender
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.
This commit is contained in:
parent
50671905d6
commit
fa39db2441
@ -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):
|
||||
|
@ -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; a<bone->segments; a++) {
|
||||
if(b_bone_rest)
|
||||
invert_m4_m4(tmat, b_bone_rest[a].mat);
|
||||
else
|
||||
tmat[3][1] = -a*(bone->length/(float)bone->segments);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)");
|
||||
|
Loading…
Reference in New Issue
Block a user