Use CTX_DATA_BEGIN_FOR_ID
This commit is contained in:
parent
ff9e0b6781
commit
098b86475d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue