Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2008-12-21 22:58:25 +0300
committerTon Roosendaal <ton@blender.org>2008-12-21 22:58:25 +0300
commitf1e0cf36f857501b43bc4cf81a845c45dc9f294e (patch)
treed144602aa1f2bd893a74f1bd54f3d77c017930e1 /source/blender/editors/space_time
parent05aa83ad1e580bb793ff529760a81c5595193d97 (diff)
2.5
Animated screen! (unfinished, now only draws, no animation code yet). Fun though to see it all work. :) NOTE: Mac ghost has timer bug, the GHOST_ProcessEvents() doesnt wake up for timers. NOTE2: Added while loop in wm_window_process_events() to force Ghost giving all events to Blender. Timers otherwise don't accumulate... might be needed to fix in ghost too. I tend to think to code own timer, this ghost stuff is totally different per platform.
Diffstat (limited to 'source/blender/editors/space_time')
-rw-r--r--source/blender/editors/space_time/time_header.c31
1 files changed, 7 insertions, 24 deletions
diff --git a/source/blender/editors/space_time/time_header.c b/source/blender/editors/space_time/time_header.c
index d664cb28ee5..e7184ffd2d2 100644
--- a/source/blender/editors/space_time/time_header.c
+++ b/source/blender/editors/space_time/time_header.c
@@ -337,23 +337,6 @@ static uiBlock *time_framemenu(bContext *C, uiMenuBlockHandle *handle, void *arg
return block;
}
-static void start_animated_screen(SpaceTime *stime)
-{
- // XXX add_screenhandler(G.curscreen, SCREEN_HANDLER_ANIM, stime->redraws);
-
- // if(stime->redraws & TIME_WITH_SEQ_AUDIO)
- // audiostream_start( CFRA );
-
- // BKE_ptcache_set_continue_physics((stime->redraws & TIME_CONTINUE_PHYSICS));
-}
-
-static void end_animated_screen(SpaceTime *stime)
-{
- // rem_screenhandler(G.curscreen, SCREEN_HANDLER_ANIM);
-
- // audiostream_stop();
- // BKE_ptcache_set_continue_physics(0);
-}
#define B_REDRAWALL 750
#define B_TL_REW 751
@@ -374,7 +357,7 @@ static void end_animated_screen(SpaceTime *stime)
void do_time_buttons(bContext *C, void *arg, int event)
{
- SpaceTime *stime= (SpaceTime*)CTX_wm_space_data(C);
+// SpaceTime *stime= (SpaceTime*)CTX_wm_space_data(C);
Scene *scene= CTX_data_scene(C);
switch(event) {
@@ -386,10 +369,10 @@ void do_time_buttons(bContext *C, void *arg, int event)
//update_for_newframe();
break;
case B_TL_PLAY:
- start_animated_screen(stime);
+ ED_animation_timer(CTX_wm_window(C), 1);
break;
case B_TL_STOP:
- end_animated_screen(stime);
+ ED_animation_timer(CTX_wm_window(C), 0);
WM_event_add_notifier(C, WM_NOTE_WINDOW_REDRAW, 0, NULL);
break;
case B_TL_FF:
@@ -524,10 +507,10 @@ void time_header_buttons(const bContext *C, ARegion *ar)
xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Skip to previous keyframe (Ctrl PageDown)");
xco+= XIC+4;
-// if(has_screenhandler(G.curscreen, SCREEN_HANDLER_ANIM))
-// uiDefIconBut(block, BUT, B_TL_STOP, ICON_PAUSE,
-// xco, 0, XIC, YIC, 0, 0, 0, 0, 0, "Stop Playing Timeline");
-// else
+ if(CTX_wm_window(C)->animtimer)
+ uiDefIconBut(block, BUT, B_TL_STOP, ICON_PAUSE,
+ xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Stop Playing Timeline");
+ else
uiDefIconBut(block, BUT, B_TL_PLAY, ICON_PLAY,
xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Play Timeline ");