svn merge -r 16454:16593 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / src / buttons_object.c
index c0b10efdd18a8389e4fb0b1fcc94f0a05ebd60db..3c385a5d8d9af946716646b20d80c0c8b5439939 100644 (file)
@@ -67,6 +67,7 @@
 #include "BIF_glutil.h"
 #include "BIF_graphics.h"
 #include "BIF_interface.h"
+#include "BIF_keyframing.h"
 #include "BIF_keyval.h"
 #include "BIF_mainqueue.h"
 #include "BIF_mywindow.h"
@@ -242,9 +243,9 @@ static void enable_constraint_ipo_func (void *ob_v, void *con_v)
        
        /* adds ipo & channels & curve if needed */
        if(con->flag & CONSTRAINT_OWN_IPO)
-               verify_ipo((ID *)ob, ID_CO, NULL, con->name, actname);
+               verify_ipo((ID *)ob, ID_CO, NULL, con->name, actname, 1);
        else
-               verify_ipo((ID *)ob, ID_CO, actname, con->name, NULL);
+               verify_ipo((ID *)ob, ID_CO, actname, con->name, NULL, 1);
                
        /* make sure ipowin shows it */
        ob->ipowin= ID_CO;
@@ -269,9 +270,9 @@ static void add_influence_key_to_constraint_func (void *ob_v, void *con_v)
 
        /* adds ipo & channels & curve if needed */
        if(con->flag & CONSTRAINT_OWN_IPO)
-               icu= verify_ipocurve((ID *)ob, ID_CO, NULL, con->name, actname, CO_ENFORCE);
+               icu= verify_ipocurve((ID *)ob, ID_CO, NULL, con->name, actname, CO_ENFORCE, 1);
        else
-               icu= verify_ipocurve((ID *)ob, ID_CO, actname, con->name, NULL, CO_ENFORCE);
+               icu= verify_ipocurve((ID *)ob, ID_CO, actname, con->name, NULL, CO_ENFORCE, 1);
                
        if (!icu) {
                error("Cannot get a curve from this IPO, may be dealing with linked data");
@@ -2945,7 +2946,8 @@ void do_effects_panels(unsigned short event)
                                        psmd= (ParticleSystemModifierData*) md;
                                        psmd->psys=psys;
                                        BLI_addtail(&ob->modifiers, md);
-                               }
+                               } else
+                                       id->us--;
 
                                idtest->us++;
                                psys->part=(ParticleSettings*)idtest;