Bugfix:
authorJoshua Leung <aligorith@gmail.com>
Sun, 22 Jun 2008 01:31:29 +0000 (01:31 +0000)
committerJoshua Leung <aligorith@gmail.com>
Sun, 22 Jun 2008 01:31:29 +0000 (01:31 +0000)
Update-automatically option in IPO-Editor now updates objects using the active IPO-block as their ObAction when transforming keyframes.

source/blender/src/transform_generics.c

index eaa4a1d0ecfb522cef767826b78831ae2bd5c3c6..6cb7a34d1bc9626c6f483467e7dfbfc863a45e8e 100644 (file)
@@ -325,7 +325,7 @@ void recalcData(TransInfo *t)
                else {
                        for (base=G.scene->base.first; base; base=base->next) {
                                /* recalculate scale of selected nla-strips */
-                               if (base->object->nlastrips.first) {
+                               if (base->object && base->object->nlastrips.first) {
                                        Object *bob= base->object;
                                        bActionStrip *strip;
                                        
@@ -398,8 +398,15 @@ void recalcData(TransInfo *t)
                                }
                        }
                        else if(G.sipo->blocktype==ID_OB) {
+                               Object *ob= OBACT;
                                Base *base= FIRSTBASE;
                                
+                               /* only if this if active object has this ipo in an action (assumes that current ipo is in action) */
+                               if ((ob) && (ob->ipoflag & OB_ACTION_OB) && (G.sipo->pin==0)) {
+                                       ob->ctime= -1234567.0f;
+                                       DAG_object_flush_update(G.scene, ob, OB_RECALC_OB);
+                               }
+                               
                                while(base) {
                                        if(base->object->ipo==G.sipo->ipo) {
                                                do_ob_ipo(base->object);