Revision: 26578
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26578
Author:   aligorith
Date:     2010-02-03 12:43:26 +0100 (Wed, 03 Feb 2010)

Log Message:
-----------
Missed a few places in previous constraints commit

Modified Paths:
--------------
    trunk/blender/source/blender/editors/object/object_constraint.c

Modified: trunk/blender/source/blender/editors/object/object_constraint.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_constraint.c     
2010-02-03 11:36:09 UTC (rev 26577)
+++ trunk/blender/source/blender/editors/object/object_constraint.c     
2010-02-03 11:43:26 UTC (rev 26578)
@@ -633,15 +633,16 @@
 
 /***************************** 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 @@
        
        /* 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);


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to