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:
authorCampbell Barton <ideasman42@gmail.com>2012-11-17 08:47:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-17 08:47:33 +0400
commit79f651a2e5ed52f7ff2041d66b707b886e80b617 (patch)
tree498bf37d648d6dc17b3d756da1c319cc97ce0e3a /source/blender/windowmanager/intern/wm_playanim.c
parent654ddfa4d2cbf2519c0bc4b187a259314e420e68 (diff)
animation playback window now pauses properly.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_playanim.c')
-rw-r--r--source/blender/windowmanager/intern/wm_playanim.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c
index 008768dc18e..dbdc77f6478 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -433,6 +433,11 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void)
ps->stopped = FALSE;
}
+ if (ps->wait2) {
+ pupdate_time();
+ ptottime = 0;
+ }
+
switch (type) {
case GHOST_kEventKeyDown:
case GHOST_kEventKeyUp:
@@ -940,6 +945,7 @@ void WM_main_playanim(int argc, const char **argv)
if (ptottime > 0.0) ptottime = 0.0;
while (ps.picture) {
+ int hasevent;
#ifndef USE_IMB_CACHE
if (ibuf != NULL && ibuf->ftype == 0) IMB_freeImBuf(ibuf);
#endif
@@ -993,21 +999,12 @@ void WM_main_playanim(int argc, const char **argv)
ps.next = ps.direction;
- {
- int hasevent = GHOST_ProcessEvents(g_WS.ghost_system, 0);
+ while ((hasevent = GHOST_ProcessEvents(g_WS.ghost_system, 0) || ps.wait2 != 0)) {
if (hasevent) {
GHOST_DispatchEvents(g_WS.ghost_system);
}
}
- /* XXX25 - we should not have to do this, but it makes scrubbing functional! */
- if (g_WS.qual & WS_QUAL_LMOUSE) {
- ps.next = 0;
- }
- else {
- ps.sstep = 0;
- }
-
ps.wait2 = ps.sstep;
if (ps.wait2 == 0 && ps.stopped == 0) {