Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_constraint.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| PointerRNA ptr = CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint); | PointerRNA ptr = CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint); | ||||
| Object *obact = (ptr.owner_id) ? (Object *)ptr.owner_id : ED_object_active_context(C); | Object *obact = (ptr.owner_id) ? (Object *)ptr.owner_id : ED_object_active_context(C); | ||||
| bConstraint *con = ptr.data; | bConstraint *con = ptr.data; | ||||
| bPoseChannel *pchan; | bPoseChannel *pchan; | ||||
| ED_object_constraint_list_from_constraint(obact, con, &pchan); | ED_object_constraint_list_from_constraint(obact, con, &pchan); | ||||
| if (pchan) { | if (pchan) { | ||||
| bool found = false; | bool found = false; | ||||
| CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, chan, selected_pose_bones, Object *, UNUSED(ob)) { | CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, chan, selected_pose_bones, Object *, ob) { | ||||
| UNUSED_VARS(ob); | |||||
| if (pchan != chan) { | if (pchan != chan) { | ||||
| /** NOTE: Can not return here, because CTX_DATA_BEGIN_WITH_ID allocated | /** NOTE: Can not return here, because CTX_DATA_BEGIN_WITH_ID allocated | ||||
| * a list that needs to be freed by CTX_DATA_END. */ | * a list that needs to be freed by CTX_DATA_END. */ | ||||
| found = true; | found = true; | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| CTX_DATA_END; | CTX_DATA_END; | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||