Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2010-02-03 14:43:26 +0300
committerJoshua Leung <aligorith@gmail.com>2010-02-03 14:43:26 +0300
commit40903efe8504d1409b920c708d877c308e680699 (patch)
treed81e4635533bf1429b5e74ec56d39523972ac100 /source/blender/editors/object/object_constraint.c
parente5bfbcca023864d173fcdc6098311a458e4f1861 (diff)
Missed a few places in previous constraints commit
Diffstat (limited to 'source/blender/editors/object/object_constraint.c')
-rw-r--r--source/blender/editors/object/object_constraint.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 6ab3d2913e9..33afc6310e2 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -633,15 +633,16 @@ void CONSTRAINT_OT_childof_clear_inverse (wmOperatorType *ot)
/***************************** BUTTONS ****************************/
-
void ED_object_constraint_set_active(Object *ob, bConstraint *con)
{
+ ListBase *lb = get_constraint_lb(ob, con, NULL);
+
/* lets be nice and escape if its active already */
// NOTE: this assumes that the stack doesn't have other active ones set...
- if (con && (con->flag & CONSTRAINT_ACTIVE))
- return ;
+ if ((lb && con) && (con->flag & CONSTRAINT_ACTIVE))
+ return;
- constraints_set_active(get_active_constraints(ob), con);
+ constraints_set_active(lb, con);
}
void ED_object_constraint_update(Object *ob)
@@ -678,9 +679,8 @@ static int constraint_delete_exec (bContext *C, wmOperator *op)
/* free the constraint */
if (remove_constraint(lb, con)) {
- /* there's no active constraint now */
- // FIXME: maybe this doesn't set things ok...
- ED_object_constraint_set_active(ob, NULL);
+ /* there's no active constraint now, so make sure this is the case */
+ constraints_set_active(lb, NULL);
/* notifiers */
WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);