diff options
author | Ton Roosendaal <ton@blender.org> | 2009-05-19 19:37:50 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-05-19 19:37:50 +0400 |
commit | 1b6bfa6b8a6d7af8819adefa646364b91a81961b (patch) | |
tree | 64e73eef832a9a12c32e4fc643667c8b52e3c1df /source/blender | |
parent | 17d0c0917e3617cb21c957f35dd91fa41110d05c (diff) |
2.5
Added new entry in 10-timer: 'Anim Step'. This will only call the
animation system itself, no drawing.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 5b870d124f8..34baf672d5e 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -33,6 +33,7 @@ #include "DNA_ID.h" #include "DNA_screen_types.h" +#include "DNA_scene_types.h" #include "DNA_userdef_types.h" #include "DNA_windowmanager_types.h" @@ -49,6 +50,7 @@ #include "BKE_library.h" #include "BKE_global.h" #include "BKE_main.h" +#include "BKE_scene.h" #include "BKE_utildefines.h" #include "BIF_gl.h" @@ -1304,6 +1306,13 @@ static int ten_timer_exec(bContext *C, wmOperator *op) CTX_wm_window_set(C, win); /* XXX context manipulation warning! */ } + else if (type==3) { + Scene *scene= CTX_data_scene(C); + + if(a & 1) scene->r.cfra--; + else scene->r.cfra++; + scene_update_for_newframe(scene, scene->lay); + } else { ED_undo_pop(C); ED_undo_redo(C); @@ -1315,7 +1324,8 @@ static int ten_timer_exec(bContext *C, wmOperator *op) if(type==0) sprintf(tmpstr, "10 x Draw Region: %d ms", time); if(type==1) sprintf(tmpstr, "10 x Draw Region and Swap: %d ms", time); if(type==2) sprintf(tmpstr, "10 x Draw Window and Swap: %d ms", time); - if(type==3) sprintf(tmpstr, "10 x Undo/Redo: %d ms", time); + if(type==3) sprintf(tmpstr, "Anim Step: %d ms", time); + if(type==4) sprintf(tmpstr, "10 x Undo/Redo: %d ms", time); WM_cursor_wait(0); @@ -1330,7 +1340,8 @@ static void WM_OT_ten_timer(wmOperatorType *ot) {0, "DRAW", "Draw Region", ""}, {1, "DRAWSWAP", "Draw Region + Swap", ""}, {2, "DRAWWINSWAP", "Draw Window + Swap", ""}, - {3, "UNDO", "Undo/Redo", ""}, + {3, "ANIMSTEP", "Anim Step", ""}, + {4, "UNDO", "Undo/Redo", ""}, {0, NULL, NULL, NULL}}; ot->name= "Ten Timer"; |