[Bf-blender-cvs] [005f4748c13] blender2.8: Multi-Object Pose: POSE_OT_group_assign/unassign

Joshua Leung noreply at git.blender.org
Mon Apr 30 18:23:11 CEST 2018


Commit: 005f4748c137605aa2e2d16f4717b85c0106af73
Author: Joshua Leung
Date:   Mon Apr 30 18:22:23 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB005f4748c137605aa2e2d16f4717b85c0106af73

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.

===================================================================

M	source/blender/editors/armature/pose_group.c

===================================================================

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);



More information about the Bf-blender-cvs mailing list