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/screen/screen_edit.c
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/screen/screen_edit.c')
-rw-r--r--source/blender/editors/screen/screen_edit.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 1022fea605c..4a60fc07a99 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -29,6 +29,7 @@
#include "MEM_guardedalloc.h"
#include "DNA_vec_types.h"
+#include "DNA_scene_types.h"
#include "BLI_blenlib.h"
@@ -1263,3 +1264,14 @@ void ed_screen_fullarea(bContext *C)
}
+void ED_animation_timer(wmWindow *win, int enable)
+{
+
+ if(win->animtimer)
+ WM_event_remove_window_timer(win, win->animtimer);
+ win->animtimer= NULL;
+
+ if(enable)
+ win->animtimer= WM_event_add_window_timer(win, (int)(1000/FPS), (int)(1000/FPS));
+}
+