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/object/object_constraint.c | |
parent | a15b3c4d111613993eca23d5f99600c2052469e7 (diff) |
API Cleanup: Use BKE_constraint prefix for constraint api
Diffstat (limited to 'source/blender/editors/object/object_constraint.c')
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 28 |
1 files changed, 14 insertions, 14 deletions
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); |