diff options
author | Alexander Ewering <blender@instinctive.de> | 2006-11-13 20:31:39 +0300 |
---|---|---|
committer | Alexander Ewering <blender@instinctive.de> | 2006-11-13 20:31:39 +0300 |
commit | 745aaf01c61d04cc368f29db17e75a09c76c15d7 (patch) | |
tree | 69d5c1d2e5c41fb9433e1965aa23a24d253bd6fa /source/blender/src/drawview.c | |
parent | b771cd9ca8b2c62c5d2c39de338cef21f7e4ef83 (diff) |
Tiny usability fix:
Until now, pressing ALT-A in a sequencer space without image preview was
pretty useless: It only showed an advancing green frame pointer :)
Now, if you press ALT-A over a sequencer space with strips, it will also
animate all sequence previews. So, no need to press SHIFT-ALT-A in that
situation anymore.
Of course, pressing ALT-A over a preview will still only play that preview.
Windows other than sequencer windows remain unaffected by this commit.
Diffstat (limited to 'source/blender/src/drawview.c')
-rw-r--r-- | source/blender/src/drawview.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index 64f24e2bd94..c39c7e6dfd3 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -3118,11 +3118,16 @@ void inner_play_anim_loop(int init, int mode) if(sa==oldsa) { scrarea_do_windraw(sa); } - else if(curmode & 1) { /* catch modes 1 and 3 */ + else if(curmode & 1) { /* all view3d and seq spaces */ if ELEM(sa->spacetype, SPACE_VIEW3D, SPACE_SEQ) { scrarea_do_windraw(sa); } } + else if(curmode & 4) { /* all seq spaces */ + if (sa->spacetype == SPACE_SEQ) { + scrarea_do_windraw(sa); + } + } sa= sa->next; } @@ -3143,17 +3148,18 @@ void inner_play_anim_loop(int init, int mode) } } -/* play_anim: 'mode' defines where to play and if repeat is on: - * - 0: current area - * - 1: all view3d and seq areas - * - 2: current area, no replay - * - 3: all view3d and seq areas, no replay */ +/* play_anim: 'mode' defines where to play and if repeat is on (now bitfield): + * - mode & 1 : All view3d and seq areas + * - mode & 2 : No replay + * - mode & 4 : All seq areas + */ int play_anim(int mode) { ScrArea *sa, *oldsa; int cfraont; unsigned short event=0; short val; + SpaceSeq *sseq = curarea->spacedata.first; /* patch for very very old scenes */ if(SFRA==0) SFRA= 1; @@ -3171,6 +3177,11 @@ int play_anim(int mode) audiostream_start( CFRA ); + if (curarea && curarea->spacetype == SPACE_SEQ) { + SpaceSeq *sseq = curarea->spacedata.first; + if (sseq->mainb == 0) mode |= 4; + } + inner_play_anim_loop(1, mode); /* 1==init */ /* forces all buffers to be OK for current frame (otherwise other windows get redrawn with CFRA+1) */ @@ -3206,7 +3217,7 @@ int play_anim(int mode) inner_play_anim_loop(0, 0); screen_swapbuffers(); - if((mode > 1) && CFRA==EFRA) break; /* no replay */ + if((mode & 2) && CFRA==EFRA) break; /* no replay */ } if(event==SPACEKEY); @@ -3219,7 +3230,7 @@ int play_anim(int mode) /* restore all areas */ sa= G.curscreen->areabase.first; while(sa) { - if( (mode && sa->spacetype==SPACE_VIEW3D) || sa==curarea) addqueue(sa->win, REDRAW, 1); + if( ((mode & 1) && sa->spacetype==SPACE_VIEW3D) || sa==curarea) addqueue(sa->win, REDRAW, 1); sa= sa->next; } |