diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-11-16 15:33:42 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-11-16 15:33:42 +0300 |
commit | a12c2a85610e28248effd019ae46518da22dac30 (patch) | |
tree | 1feb3968d5a22c9a65a86b8f329aa8b311517a78 /source/blender/editors/object/object_constraint.c | |
parent | 567ee32f14304a462e59bde2de92b10861ad7c86 (diff) |
Constraints: Code cleanup
* Removing duplicate api functions
* Shuffled around newly added api functions to make the ordering more consistent
* Fixes for a few bugs in the api functions as I checked over them
* Replaced most of the #defines for flags and modes with enums
Diffstat (limited to 'source/blender/editors/object/object_constraint.c')
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 33cee59f0a8..4a4184c7035 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -101,7 +101,7 @@ ListBase *get_active_constraints (Object *ob) /* single constraint */ bConstraint *get_active_constraint (Object *ob) { - return find_active_constraint(get_active_constraints(ob)); + return constraints_get_active(get_active_constraints(ob)); } /* -------------- Constraint Management (Add New, Remove, Rename) -------------------- */ /* ------------- PyConstraints ------------------ */ @@ -646,10 +646,11 @@ void ED_object_constraint_rename(Object *ob, bConstraint *con, char *oldname) void ED_object_constraint_set_active(Object *ob, bConstraint *con) { /* lets be nice and escape if its active already */ - if(con && (con->flag & CONSTRAINT_ACTIVE)) + // NOTE: this assumes that the stack doesn't have other active ones set... + if (con && (con->flag & CONSTRAINT_ACTIVE)) return ; - set_active_constraint(get_active_constraints(ob), con); + constraints_set_active(get_active_constraints(ob), con); } void ED_object_constraint_update(Object *ob) |