Page MenuHome

Active pose bone override not taken into account in bpy.ops.constraint.move_up()
Confirmed, LowPublicTO DO

Description

bpy.ops.constraint.move_up(ctx, constraint="FOOBAR", owner='BONE') returns cancelled if the Pose Bone is not the active bone, despite all related context members are overriden:

ctx = bpy.context.copy()
ctx['constraint'] = con
ctx['active_bone'] = bone
ctx['active_pose_bone'] = pbone
ctx['selected_bones'] = [bone]
ctx['selected_pose_bones'] = [pbone]
ctx['selected_editable_bones'] = [pbone]

It only works if the corresponding bone is really made active using ob.data.bones.active

Sample setup:

Event Timeline

codemanx created this task.May 26 2014, 7:23 PM
codemanx raised the priority of this task from to 90.
codemanx updated the task description. (Show Details)
codemanx edited a custom field.
codemanx added a subscriber: codemanx.
Campbell Barton (campbellbarton) lowered the priority of this task from 90 to Low.May 27 2014, 3:40 AM
Campbell Barton (campbellbarton) edited a custom field.