Cleaned up the old call to do_all_actions(). It only is supposed to do
authorTon Roosendaal <ton@blender.org>
Mon, 11 Jul 2005 08:04:34 +0000 (08:04 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 11 Jul 2005 08:04:34 +0000 (08:04 +0000)
a single object, but was still called outside of that scope. Caused crashes
for example when editing Ipo curves of action keys.

editaction.c and editnla.c still need to be tackled...

source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/scene.c
source/blender/render/intern/source/initrender.c
source/blender/src/drawview.c
source/blender/src/editaction.c
source/blender/src/editipo.c

index 4f2b5eac15c28e0add4d6101cb9f35a623df2a9d..e33fed722a094c568ceef099745177a24329a92d 100644 (file)
@@ -498,6 +498,8 @@ void do_all_actions(Object *ob)
        float striptime, frametime, length, actlength;
        float blendfac, stripframe;
 
+       if(ob==NULL) return;    // only to have safe calls from editor
+       
        /* Retrieve data from the NLA */
        if(ob->type==OB_ARMATURE && ob->pose) {
                bArmature *arm= ob->data;
index 255cdba9f6d00b9927b271a92afa9ea7de118ca2..9bccdf6153608063c343dbf9b54b18b13b88afc7 100644 (file)
@@ -268,11 +268,6 @@ void set_scene_bg(Scene *sce)
        
        /* do we need FRAMECHANGED in set_scene? */
 //     if (G.f & G_DOSCRIPTLINKS) BPY_do_all_scripts(SCRIPT_FRAMECHANGED);
-
-//     do_all_keys();
-
-//     do_all_actions(NULL);
-
 }
 
 void set_scene_name(char *name)
@@ -431,10 +426,6 @@ void scene_update_for_newframe(Scene *sce, unsigned int lay)
        
        if (G.f & G_DOSCRIPTLINKS) BPY_do_all_scripts(SCRIPT_FRAMECHANGED);
        
-//     do_all_actions(NULL);
-       /* so nice, better do it twice */
-//     do_all_actions(NULL);
-       
        /* if keys were activated, disable the locks */
        unlock_all_keys();
        
index e59b66b950c00e397f6f0668c9e71f5157554a09..c065df6973d14fc7ae45f35e4b645fe6840088b5 100644 (file)
@@ -1491,9 +1491,8 @@ void RE_animrender(struct View3D *ogl_render_view3d)
 
        /* restore time */
        if(R.r.mode & (R_FIELDS|R_MBLUR)) {
-//             do_all_ipos();
-//             do_all_keys();
-//             do_all_actions(NULL);
+               /* applies changes fully */
+               scene_update_for_newframe(G.scene, G.scene->lay);
        }
 
        if (0) {
index 738803161f35591f8cbf5880606b37f74a0bf803..c9fb043e332248bc31276c578a350b807aa85316 100644 (file)
@@ -2276,9 +2276,6 @@ void inner_play_anim_loop(int init, int mode)
        }
 
        set_timecursor(CFRA);
-
-       //clear_all_constraints();
-       //do_all_actions(NULL);
        
        update_for_newframe_muted();
 
index 4e7fced2dbdabb992862a195f74a99319bc32465..d0d401f4bca5da264a089cdefd8629e69838313d 100644 (file)
@@ -1253,7 +1253,7 @@ void transform_actionchannel_keys(char mode)
                        }
        
                        if (G.saction->lock){
-                               do_all_actions(NULL);
+                               do_all_actions(OBACT);
                                force_draw_all(0);
                        }
                        else {
@@ -1269,7 +1269,7 @@ void transform_actionchannel_keys(char mode)
        /*              Update the curve */
        /*              Depending on the lock status, draw necessary views */
 
-       do_all_actions(NULL);
+       do_all_actions(OBACT);
        remake_action_ipos(act);
 
        if(cancel==0) BIF_undo_push("Transform Action");
@@ -1436,7 +1436,7 @@ void transform_meshchannel_keys(char mode, Key *key)
                                 * future
                                 */
                                 
-                do_all_actions(NULL);
+                do_all_actions(OBACT);
                 allqueue (REDRAWVIEW3D, 0);
                 allqueue (REDRAWACTION, 0);
                 allqueue (REDRAWIPO, 0);
index 63e48d1d760fca34f1b84fa0c710a7322bdc000a..d8548af06035bccafd2e35940b1e066f95acad5d 100644 (file)
@@ -478,7 +478,7 @@ void editipo_changed(SpaceIpo *si, int doredraw)
                }
                else if(si->blocktype==ID_SEQ) clear_last_seq();
                else if(si->blocktype==ID_AC){
-                       do_all_actions(NULL);
+                       do_all_actions(OBACT);
                        allqueue(REDRAWACTION, 0);
                        allqueue(REDRAWNLA, 0);
                }
@@ -4862,7 +4862,7 @@ void transform_ipo(int mode)
                                        force_draw_plus(SPACE_VIEW3D, 0);
                                }
                                else if(G.sipo->blocktype==ID_AC) {
-                                       do_all_actions(NULL);
+                                       do_all_actions(OBACT);
                                        force_draw_all(0);
                                }
                                else if(G.sipo->blocktype==ID_OB) {