diff options
author | Joshua Leung <aligorith@gmail.com> | 2018-04-30 19:22:23 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2018-04-30 19:23:05 +0300 |
commit | 005f4748c137605aa2e2d16f4717b85c0106af73 (patch) | |
tree | 8aa7292c7b3d981138ab16789273738b6fbe2435 /source/blender/editors/armature/pose_group.c | |
parent | de1405949a2e120670347bbec3c40f1828b386bd (diff) |
Multi-Object Pose: POSE_OT_group_assign/unassign
Like the select/deselect operators, we only support doing this for the
active object for now. From the UI panels, it doesn't make sense to be
operating on bone groups which may not appear/line up with those in the panel
that we're currently dealing with.
This can be reviewed later, but for now, it's easier and makes more sense
this way.
Diffstat (limited to 'source/blender/editors/armature/pose_group.c')
-rw-r--r-- | source/blender/editors/armature/pose_group.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/armature/pose_group.c b/source/blender/editors/armature/pose_group.c index aca170a692a..e16cf3b0b8d 100644 --- a/source/blender/editors/armature/pose_group.c +++ b/source/blender/editors/armature/pose_group.c @@ -205,12 +205,12 @@ static int pose_group_assign_exec(bContext *C, wmOperator *op) BKE_pose_add_group(ob->pose, NULL); /* add selected bones to group then */ - CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones) + FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN (ob, pchan) { pchan->agrp_index = pose->active_group; done = true; } - CTX_DATA_END; + FOREACH_PCHAN_SELECTED_IN_OBJECT_END; /* notifiers for updates */ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob); @@ -252,14 +252,14 @@ static int pose_group_unassign_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_CANCELLED; /* find selected bones to remove from all bone groups */ - CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones) + FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN (ob, pchan) { if (pchan->agrp_index) { pchan->agrp_index = 0; done = true; } } - CTX_DATA_END; + FOREACH_PCHAN_SELECTED_IN_OBJECT_END; /* notifiers for updates */ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob); |