diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-11 05:47:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-11 05:47:07 +0400 |
commit | 3216e4b202195ed88455d1b43b348a2cf8f40d77 (patch) | |
tree | 48b91e2916e48c74cc780f4ef2df538949bccf31 /source/blender/editors | |
parent | a15b3c4d111613993eca23d5f99600c2052469e7 (diff) |
API Cleanup: Use BKE_constraint prefix for constraint api
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/armature/armature_add.c | 2 | ||||
-rw-r--r-- | source/blender/editors/armature/armature_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/armature/armature_naming.c | 2 | ||||
-rw-r--r-- | source/blender/editors/armature/armature_relations.c | 6 | ||||
-rw-r--r-- | source/blender/editors/armature/editarmature_retarget.c | 4 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_edit.c | 4 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_select.c | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 6 | ||||
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 28 | ||||
-rw-r--r-- | source/blender/editors/object/object_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 12 | ||||
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform.c | 10 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 2 |
15 files changed, 44 insertions, 44 deletions
diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c index 52a8137f27f..16975eed75e 100644 --- a/source/blender/editors/armature/armature_add.c +++ b/source/blender/editors/armature/armature_add.c @@ -312,7 +312,7 @@ void updateDuplicateSubtargetObjects(EditBone *dupBone, ListBase *editbones, Obj /* does this constraint have a subtarget in * this armature? */ - bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(curcon); + bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(curcon); ListBase targets = {NULL, NULL}; bConstraintTarget *ct; diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c index e5e4ee9bf08..52423c8fca7 100644 --- a/source/blender/editors/armature/armature_edit.c +++ b/source/blender/editors/armature/armature_edit.c @@ -1221,7 +1221,7 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op)) } else { for (con = pchan->constraints.first; con; con = con->next) { - bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con); + bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con); ListBase targets = {NULL, NULL}; bConstraintTarget *ct; diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c index c214dc35fbf..9afc45955bd 100644 --- a/source/blender/editors/armature/armature_naming.c +++ b/source/blender/editors/armature/armature_naming.c @@ -104,7 +104,7 @@ static void constraint_bone_name_fix(Object *ob, ListBase *conlist, const char * bConstraintTarget *ct; for (curcon = conlist->first; curcon; curcon = curcon->next) { - bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(curcon); + bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(curcon); ListBase targets = {NULL, NULL}; /* constraint targets */ diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c index 21f769bb3ed..9faf6d59bd0 100644 --- a/source/blender/editors/armature/armature_relations.c +++ b/source/blender/editors/armature/armature_relations.c @@ -73,7 +73,7 @@ static void joined_armature_fix_links_constraints( bConstraint *con; for (con = lb->first; con; con = con->next) { - bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con); + bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con); ListBase targets = {NULL, NULL}; bConstraintTarget *ct; @@ -300,7 +300,7 @@ static void separated_armature_fix_links(Object *origArm, Object *newArm) if (ob->type == OB_ARMATURE) { for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { for (con = pchan->constraints.first; con; con = con->next) { - bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con); + bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con); ListBase targets = {NULL, NULL}; bConstraintTarget *ct; @@ -338,7 +338,7 @@ static void separated_armature_fix_links(Object *origArm, Object *newArm) /* fix object-level constraints */ if (ob != origArm) { for (con = ob->constraints.first; con; con = con->next) { - bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con); + bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con); ListBase targets = {NULL, NULL}; bConstraintTarget *ct; diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index 8f71f722525..b18b21bd682 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -708,7 +708,7 @@ static void RIG_reconnectControlBones(RigGraph *rg) /* DO SOME MAGIC HERE */ for (pchan = rg->ob->pose->chanbase.first; pchan; pchan = pchan->next) { for (con = pchan->constraints.first; con; con = con->next) { - bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con); + bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con); ListBase targets = {NULL, NULL}; bConstraintTarget *ct; @@ -833,7 +833,7 @@ static void RIG_reconnectControlBones(RigGraph *rg) /* DO SOME MAGIC HERE */ for (pchan = rg->ob->pose->chanbase.first; pchan; pchan = pchan->next) { for (con = pchan->constraints.first; con; con = con->next) { - bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con); + bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con); ListBase targets = {NULL, NULL}; bConstraintTarget *ct; diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index e004b37a307..4705d106248 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -424,7 +424,7 @@ static void pose_copy_menu(Scene *scene) /* copy constraints to tmpbase and apply 'local' tags before * appending to list of constraints for this channel */ - BKE_copy_constraints(&tmp_constraints, &pchanact->constraints, true); + BKE_constraints_copy(&tmp_constraints, &pchanact->constraints, true); if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) { bConstraint *con; @@ -536,7 +536,7 @@ static void pose_copy_menu(Scene *scene) /* copy constraints to tmpbase and apply 'local' tags before * appending to list of constraints for this channel */ - BKE_copy_constraints(&tmp_constraints, &const_copy, true); + BKE_constraints_copy(&tmp_constraints, &const_copy, true); if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) { /* add proxy-local tags */ for (con = tmp_constraints.first; con; con = con->next) diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c index a852f47ba4b..c10c028c2ae 100644 --- a/source/blender/editors/armature/pose_select.c +++ b/source/blender/editors/armature/pose_select.c @@ -464,7 +464,7 @@ static int pose_select_constraint_target_exec(bContext *C, wmOperator *UNUSED(op { if (pchan->bone->flag & BONE_SELECTED) { for (con = pchan->constraints.first; con; con = con->next) { - bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con); + bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con); ListBase targets = {NULL, NULL}; bConstraintTarget *ct; diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 6284c1a0442..9fa26373ec5 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -1112,7 +1112,7 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) // int rb_col; // UNUSED /* get constraint typeinfo */ - cti = BKE_constraint_get_typeinfo(con); + cti = BKE_constraint_typeinfo_get(con); if (cti == NULL) { /* exception for 'Null' constraint - it doesn't have constraint typeinfo! */ BLI_strncpy(typestr, (con->type == CONSTRAINT_TYPE_NULL) ? IFACE_("Null") : IFACE_("Unknown"), sizeof(typestr)); @@ -1121,7 +1121,7 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) BLI_strncpy(typestr, IFACE_(cti->name), sizeof(typestr)); /* determine whether constraint is proxy protected or not */ - if (BKE_proxylocked_constraints_owner(ob, pchan)) + if (BKE_constraints_proxylocked_owner(ob, pchan)) proxy_protected = (con->flag & CONSTRAINT_PROXY_LOCAL) == 0; else proxy_protected = 0; @@ -1184,7 +1184,7 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) * * Up/Down buttons should only be shown (or not grayed - todo) if they serve some purpose. */ - if (BKE_proxylocked_constraints_owner(ob, pchan)) { + if (BKE_constraints_proxylocked_owner(ob, pchan)) { if (con->prev) { prev_proxylock = (con->prev->flag & CONSTRAINT_PROXY_LOCAL) ? 0 : 1; } diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 9b79b2e93da..2e5ca3b7a6b 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -143,7 +143,7 @@ ListBase *get_constraint_lb(Object *ob, bConstraint *con, bPoseChannel **r_pchan /* single constraint */ bConstraint *get_active_constraint(Object *ob) { - return BKE_constraints_get_active(get_active_constraints(ob)); + return BKE_constraints_active_get(get_active_constraints(ob)); } /* -------------- Constraint Management (Add New, Remove, Rename) -------------------- */ @@ -227,7 +227,7 @@ static void update_pyconstraint_cb(void *arg1, void *arg2) /* helper function for add_constriant - sets the last target for the active constraint */ static void set_constraint_nth_target(bConstraint *con, Object *target, const char subtarget[], int index) { - bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con); + bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con); ListBase targets = {NULL, NULL}; bConstraintTarget *ct; int num_targets, i; @@ -299,7 +299,7 @@ static void test_constraints(Object *owner, bPoseChannel *pchan) /* Check all constraints - is constraint valid? */ if (conlist) { for (curcon = conlist->first; curcon; curcon = curcon->next) { - bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(curcon); + bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(curcon); ListBase targets = {NULL, NULL}; bConstraintTarget *ct; @@ -614,7 +614,7 @@ static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int list = get_active_constraints(ob); } - con = BKE_constraints_findByName(list, constraint_name); + con = BKE_constraints_find_name(list, constraint_name); //if (G.debug & G_DEBUG) //printf("constraint found = %p, %s\n", (void *)con, (con) ? con->name : "<Not found>"); @@ -1135,7 +1135,7 @@ void ED_object_constraint_set_active(Object *ob, bConstraint *con) if ((lb && con) && (con->flag & CONSTRAINT_ACTIVE)) return; - BKE_constraints_set_active(lb, con); + BKE_constraints_active_set(lb, con); } void ED_object_constraint_update(Object *ob) @@ -1174,9 +1174,9 @@ static int constraint_delete_exec(bContext *C, wmOperator *UNUSED(op)) const bool is_ik = ELEM(con->type, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK); /* free the constraint */ - if (BKE_remove_constraint(lb, con)) { + if (BKE_constraint_remove(lb, con)) { /* there's no active constraint now, so make sure this is the case */ - BKE_constraints_set_active(lb, NULL); + BKE_constraints_active_set(lb, NULL); ED_object_constraint_update(ob); /* needed to set the flags on posebones correctly */ @@ -1319,7 +1319,7 @@ static int pose_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op)) /* free constraints for all selected bones */ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones) { - BKE_free_constraints(&pchan->constraints); + BKE_constraints_free(&pchan->constraints); pchan->constflag &= ~(PCHAN_HAS_IK | PCHAN_HAS_SPLINEIK | PCHAN_HAS_CONST); } CTX_DATA_END; @@ -1356,7 +1356,7 @@ static int object_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op)) /* do freeing */ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) { - BKE_free_constraints(&ob->constraints); + BKE_constraints_free(&ob->constraints); DAG_id_tag_update(&ob->id, OB_RECALC_OB); } CTX_DATA_END; @@ -1400,7 +1400,7 @@ static int pose_constraint_copy_exec(bContext *C, wmOperator *op) { /* if we're not handling the object we're copying from, copy all constraints over */ if (pchan != chan) { - BKE_copy_constraints(&chan->constraints, &pchan->constraints, true); + BKE_constraints_copy(&chan->constraints, &pchan->constraints, true); /* update flags (need to add here, not just copy) */ chan->constflag |= pchan->constflag; } @@ -1440,7 +1440,7 @@ static int object_constraint_copy_exec(bContext *C, wmOperator *UNUSED(op)) { /* if we're not handling the object we're copying from, copy all constraints over */ if (obact != ob) { - BKE_copy_constraints(&ob->constraints, &obact->constraints, true); + BKE_constraints_copy(&ob->constraints, &obact->constraints, true); DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } } @@ -1650,9 +1650,9 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase /* create a new constraint of the type requried, and add it to the active/given constraints list */ if (pchan) - con = BKE_add_pose_constraint(ob, pchan, NULL, type); + con = BKE_constraint_add_for_pose(ob, pchan, NULL, type); else - con = BKE_add_ob_constraint(ob, NULL, type); + con = BKE_constraint_add_for_object(ob, NULL, type); /* get the first selected object/bone, and make that the target * - apart from the buttons-window add buttons, we shouldn't add in this way @@ -1948,7 +1948,7 @@ static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op)) for (con = pchan->constraints.first; con; con = next) { next = con->next; if (con->type == CONSTRAINT_TYPE_KINEMATIC) { - BKE_remove_constraint(&pchan->constraints, con); + BKE_constraint_remove(&pchan->constraints, con); } } pchan->constflag &= ~(PCHAN_HAS_IK | PCHAN_HAS_TARGET); diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 5b0bfef6330..8a8881fc6fc 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -990,7 +990,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) } else if (event == 22) { /* Copy the constraint channels over */ - BKE_copy_constraints(&base->object->constraints, &ob->constraints, true); + BKE_constraints_copy(&base->object->constraints, &ob->constraints, true); do_depgraph_update = true; } diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 7e138639cea..44d6bc00250 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -738,12 +738,12 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object bFollowPathConstraint *data; float cmat[4][4], vec[3]; - con = BKE_add_ob_constraint(ob, "AutoPath", CONSTRAINT_TYPE_FOLLOWPATH); + con = BKE_constraint_add_for_object(ob, "AutoPath", CONSTRAINT_TYPE_FOLLOWPATH); data = con->data; data->tar = par; - BKE_get_constraint_target_matrix(scene, con, 0, CONSTRAINT_OBTYPE_OBJECT, NULL, cmat, scene->r.cfra); + BKE_constraint_target_matrix_get(scene, con, 0, CONSTRAINT_OBTYPE_OBJECT, NULL, cmat, scene->r.cfra); sub_v3_v3v3(vec, ob->obmat[3], cmat[3]); copy_v3_v3(ob->loc, vec); @@ -1130,7 +1130,7 @@ static int object_track_clear_exec(bContext *C, wmOperator *op) for (con = ob->constraints.last; con; con = pcon) { pcon = con->prev; if (ELEM3(con->type, CONSTRAINT_TYPE_TRACKTO, CONSTRAINT_TYPE_LOCKTRACK, CONSTRAINT_TYPE_DAMPTRACK)) - BKE_remove_constraint(&ob->constraints, con); + BKE_constraint_remove(&ob->constraints, con); } if (type == 1) @@ -1186,7 +1186,7 @@ static int track_set_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) { if (ob != obact) { - con = BKE_add_ob_constraint(ob, "AutoTrack", CONSTRAINT_TYPE_DAMPTRACK); + con = BKE_constraint_add_for_object(ob, "AutoTrack", CONSTRAINT_TYPE_DAMPTRACK); data = con->data; data->tar = obact; @@ -1207,7 +1207,7 @@ static int track_set_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) { if (ob != obact) { - con = BKE_add_ob_constraint(ob, "AutoTrack", CONSTRAINT_TYPE_TRACKTO); + con = BKE_constraint_add_for_object(ob, "AutoTrack", CONSTRAINT_TYPE_TRACKTO); data = con->data; data->tar = obact; @@ -1229,7 +1229,7 @@ static int track_set_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) { if (ob != obact) { - con = BKE_add_ob_constraint(ob, "AutoTrack", CONSTRAINT_TYPE_LOCKTRACK); + con = BKE_constraint_add_for_object(ob, "AutoTrack", CONSTRAINT_TYPE_LOCKTRACK); data = con->data; data->tar = obact; diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index f66e5a74b41..43251ac930f 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -2050,7 +2050,7 @@ static void object_solver_inverted_matrix(Scene *scene, Object *ob, float invmat bool found = false; for (con = ob->constraints.first; con; con = con->next) { - bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con); + bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con); if (!cti) continue; @@ -2081,7 +2081,7 @@ static Object *object_solver_camera(Scene *scene, Object *ob) bConstraint *con; for (con = ob->constraints.first; con; con = con->next) { - bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con); + bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con); if (!cti) continue; diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index fbd79798ab2..bb31e73f6a1 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -7497,7 +7497,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short } } else { - bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(curcon); + bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(curcon); if ((cti && cti->get_constraint_targets) && (curcon->flag & CONSTRAINT_EXPAND)) { ListBase targets = {NULL, NULL}; diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 8b0667a8992..3ee4cd2da00 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -2478,8 +2478,8 @@ static void protectedQuaternionBits(short protectflag, float quat[4], const floa static void constraintTransLim(TransInfo *t, TransData *td) { if (td->con) { - bConstraintTypeInfo *ctiLoc = BKE_get_constraint_typeinfo(CONSTRAINT_TYPE_LOCLIMIT); - bConstraintTypeInfo *ctiDist = BKE_get_constraint_typeinfo(CONSTRAINT_TYPE_DISTLIMIT); + bConstraintTypeInfo *ctiLoc = BKE_constraint_typeinfo_from_type(CONSTRAINT_TYPE_LOCLIMIT); + bConstraintTypeInfo *ctiDist = BKE_constraint_typeinfo_from_type(CONSTRAINT_TYPE_DISTLIMIT); bConstraintOb cob = {NULL}; bConstraint *con; @@ -2529,7 +2529,7 @@ static void constraintTransLim(TransInfo *t, TransData *td) } /* get constraint targets if needed */ - BKE_get_constraint_targets_for_solving(con, &cob, &targets, ctime); + BKE_constraint_targets_for_solving_get(con, &cob, &targets, ctime); /* do constraint */ cti->evaluate_constraint(con, &cob, &targets); @@ -2581,7 +2581,7 @@ static void constraintob_from_transdata(bConstraintOb *cob, TransData *td) static void constraintRotLim(TransInfo *UNUSED(t), TransData *td) { if (td->con) { - bConstraintTypeInfo *cti = BKE_get_constraint_typeinfo(CONSTRAINT_TYPE_ROTLIMIT); + bConstraintTypeInfo *cti = BKE_constraint_typeinfo_from_type(CONSTRAINT_TYPE_ROTLIMIT); bConstraintOb cob; bConstraint *con; bool do_limit = false; @@ -2648,7 +2648,7 @@ static void constraintRotLim(TransInfo *UNUSED(t), TransData *td) static void constraintSizeLim(TransInfo *t, TransData *td) { if (td->con && td->ext) { - bConstraintTypeInfo *cti = BKE_get_constraint_typeinfo(CONSTRAINT_TYPE_SIZELIMIT); + bConstraintTypeInfo *cti = BKE_constraint_typeinfo_from_type(CONSTRAINT_TYPE_SIZELIMIT); bConstraintOb cob = {NULL}; bConstraint *con; float size_sign[3], size_abs[3]; diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 6f0208175b1..9333fceff5c 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -884,7 +884,7 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan) } } - con = BKE_add_pose_constraint(NULL, pchan, "TempConstraint", CONSTRAINT_TYPE_KINEMATIC); + con = BKE_constraint_add_for_pose(NULL, pchan, "TempConstraint", CONSTRAINT_TYPE_KINEMATIC); pchan->constflag |= (PCHAN_HAS_IK | PCHAN_HAS_TARGET); /* for draw, but also for detecting while pose solving */ data = con->data; if (targetless) { |