[Bf-blender-cvs] [098b86475d9] blender2.8: Use CTX_DATA_BEGIN_FOR_ID

Dalai Felinto noreply at git.blender.org
Wed Oct 17 03:18:20 CEST 2018


Commit: 098b86475d959822a4da2ea2c6fe89b137726edf
Author: Dalai Felinto
Date:   Tue Oct 16 22:18:02 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB098b86475d959822a4da2ea2c6fe89b137726edf

Use CTX_DATA_BEGIN_FOR_ID

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

M	source/blender/editors/object/object_constraint.c

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

diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 982e588b414..6d39ade8fd5 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -1639,12 +1639,8 @@ static bool get_new_constraint_target(bContext *C, int con_type, Object **tar_ob
 	/* if the active Object is Armature, and we can search for bones, do so... */
 	if ((obact->type == OB_ARMATURE) && (only_ob == false)) {
 		/* search in list of selected Pose-Channels for target */
-		CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, pchan, selected_pose_bones, Object *, ob)
+		CTX_DATA_BEGIN_FOR_ID (C, bPoseChannel *, pchan, selected_pose_bones, &obact->id)
 		{
-			if (ob != obact) {
-				continue;
-			}
-
 			/* just use the first one that we encounter, as long as it is not the active one */
 			if (pchan != pchanact) {
 				*tar_ob = obact;



More information about the Bf-blender-cvs mailing list