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>2009-05-21 17:33:04 +0400
committerTon Roosendaal <ton@blender.org>2009-05-21 17:33:04 +0400
commit99cb9a26b0b217d2e36938983809337abce67835 (patch)
tree950abb5dc5390ce6127e1bfa0a828680fbdafcc0 /source/blender/windowmanager
parent8013f6522e6b3d19d92bc14a50d18db3dd99b6d6 (diff)
2.5
Animation playback back in control. And non-blocking still! - Play follows the "Playback" options in TimeLine menu. Only the region 'windows' are drawn, not headers, toolbars, channel views, etc. The option "Buttons Window" also redraws property regions. - The Timeline header always redraws, this to denote at least progressing frame numbers - For now: if you choose to play 3D views, it also redraws the TimeLine. Seems to be good convention, but probably better to add menu option for it? - Fun test: while playback, change Playback options, works OK! - New: top header button shows animation play status, and allows to stop playback - New: Animation stop/start operator. Assigned to ALT+A. It has no options yet; just plays active region + all 3D windows now. Options will follow, based on reviews. Also ESC won't work for now, just press ALT+A again.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/WM_types.h5
-rw-r--r--source/blender/windowmanager/intern/wm_window.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index d3cb60d90fe..b96089a05f1 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -169,7 +169,7 @@ typedef struct wmNotifier {
/* NC_SCREEN screen */
#define ND_SCREENBROWSE (1<<16)
#define ND_SCREENCAST (2<<16)
-
+#define ND_ANIMPLAY (3<<16)
/* NC_SCENE Scene */
#define ND_SCENEBROWSE (1<<16)
@@ -276,7 +276,8 @@ typedef struct wmTabletData {
typedef struct wmTimer {
struct wmTimer *next, *prev;
double timestep; /* set by timer user */
- int event_type; /* set by timer user */
+ int event_type; /* set by timer user, goes to event system */
+ void *customdata; /* set by timer user, to allow custom values */
double duration; /* total running time in seconds */
double delta; /* time since previous step in seconds */
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 2675fba729a..cb6bcb41366 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -93,6 +93,8 @@ static void wm_ghostwindow_destroy(wmWindow *win)
ED_screen_exit should have been called */
void wm_window_free(bContext *C, wmWindow *win)
{
+ wmTimer *wt;
+
/* update context */
if(C) {
wmWindowManager *wm= CTX_wm_manager(C);
@@ -108,6 +110,10 @@ void wm_window_free(bContext *C, wmWindow *win)
}
if(win->eventstate) MEM_freeN(win->eventstate);
+
+ for(wt= win->timers.first; wt; wt= wt->next)
+ if(wt->customdata)
+ MEM_freeN(wt->customdata);
BLI_freelistN(&win->timers);
wm_event_free_all(win);
@@ -657,6 +663,8 @@ void WM_event_remove_window_timer(wmWindow *win, wmTimer *timer)
break;
if(wt) {
BLI_remlink(&win->timers, wt);
+ if(wt->customdata)
+ MEM_freeN(wt->customdata);
MEM_freeN(wt);
}
}