bugfix [#23831] Removing an IK Constraint in pose mode still draws bone with IK highlight

+ moved bone envalope scale into transform menu, pose menu is getting huge.
This commit is contained in:
Campbell Barton 2010-09-16 07:14:48 +00:00
parent 6b18c9dc61
commit f788c68b9c
3 changed files with 8 additions and 8 deletions

@ -151,6 +151,11 @@ class VIEW3D_MT_transform(bpy.types.Menu):
layout.operator("transform.shear", text="Shear")
layout.operator("transform.warp", text="Warp")
layout.operator("transform.push_pull", text="Push/Pull")
obj = context.object
if obj.type == 'ARMATURE' and obj.mode in ('EDIT', 'POSE') and obj.data.draw_type in ('BBONE', 'ENVELOPE'):
layout.operator("transform.transform", text="Scale Envelope/BBone").mode = 'BONE_SIZE'
if context.edit_object and context.edit_object.type == 'ARMATURE':
layout.operator("armature.align")
else:
@ -1108,8 +1113,6 @@ class VIEW3D_MT_pose(bpy.types.Menu):
layout.menu("VIEW3D_MT_transform")
layout.menu("VIEW3D_MT_snap")
if arm.draw_type in ('BBONE', 'ENVELOPE'):
layout.operator("transform.transform", text="Scale Envelope Distance").mode = 'BONESIZE'
layout.menu("VIEW3D_MT_pose_transform")
@ -1849,11 +1852,6 @@ class VIEW3D_MT_edit_armature(bpy.types.Menu):
layout.menu("VIEW3D_MT_snap")
layout.menu("VIEW3D_MT_edit_armature_roll")
if arm.draw_type == 'ENVELOPE':
layout.operator("transform.transform", text="Scale Envelope Distance").mode = 'BONESIZE'
else:
layout.operator("transform.transform", text="Scale B-Bone Width").mode = 'BONESIZE'
layout.separator()
layout.operator("armature.extrude_move")

@ -805,6 +805,8 @@ static int constraint_delete_exec (bContext *C, wmOperator *op)
/* there's no active constraint now, so make sure this is the case */
constraints_set_active(lb, NULL);
ED_object_constraint_update(ob); /* needed to set the flags on posebones correctly */
/* notifiers */
WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);

@ -752,7 +752,7 @@ void TRANSFORM_OT_transform(struct wmOperatorType *ot)
{TFM_PUSHPULL, "PUSHPULL", 0, "Pushpull", ""},
{TFM_CREASE, "CREASE", 0, "Crease", ""},
{TFM_MIRROR, "MIRROR", 0, "Mirror", ""},
{TFM_BONESIZE, "BONESIZE", 0, "Bonesize", ""},
{TFM_BONESIZE, "BONE_SIZE", 0, "Bonesize", ""},
{TFM_BONE_ENVELOPE, "BONE_ENVELOPE", 0, "Bone_Envelope", ""},
{TFM_CURVE_SHRINKFATTEN, "CURVE_SHRINKFATTEN", 0, "Curve_Shrinkfatten", ""},
{TFM_BONE_ROLL, "BONE_ROLL", 0, "Bone_Roll", ""},