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>2005-05-12 00:01:42 +0400
committerTon Roosendaal <ton@blender.org>2005-05-12 00:01:42 +0400
commit0574768f8897f20e8eca213742e0987d122787c7 (patch)
treed0ed5584b2b2f09520d8692363344dbff9ff275b /source/blender/src/space.c
parent57f9553b3a67fdf1e152e4cda6a5ed566bc208b2 (diff)
Animated UI for TimeLine "Play"
Using the Play button in timeline, now uses an event-driven system to update the animation system and signal windows to redraw. Meaning the full UI remains responsive! Check the new Pulldown "Playback" to set which windows you like to see updated. Same settings is used for LMB 'dragging' frames in Timeline. Implementation notes; - the Icon for 'Pause' (or stop) has to be made yet, I commit this from my laptop... all was coded during a 2 x 5 hour train ride to germany - the anim playback system (ALT+A too) now uses correct "frames per second" as maximum speed. Buttons can be found in 3 places in the UI, also added it as pulldown item - The system works with 'screen handlers', which has been coded with using Python (networked) events or verse in mind too. A doc on that will follow. - the buttons code has been made 'resistant' to animated UIs too, preventing flashing of hilites. - All subloops (like transform) stop playback, with exception of MMB view manipulations. As extra; found tweak to make Textured AA fonts draw without distortion. Looks perfect here on laptop now (like Pixmap fonts) and is 20x faster.
Diffstat (limited to 'source/blender/src/space.c')
-rw-r--r--source/blender/src/space.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/src/space.c b/source/blender/src/space.c
index bec4fd46264..a49f5167e77 100644
--- a/source/blender/src/space.c
+++ b/source/blender/src/space.c
@@ -1732,6 +1732,7 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
handle_view3d_around();
scrarea_queue_headredraw(curarea);
+ scrarea_queue_winredraw(curarea);
break;
case PERIODKEY:
@@ -1743,6 +1744,7 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
handle_view3d_around();
scrarea_queue_headredraw(curarea);
+ scrarea_queue_winredraw(curarea);
break;
case PADSLASHKEY:
@@ -4282,16 +4284,14 @@ static void init_timespace(ScrArea *sa)
stime->spacetype= SPACE_TIME;
stime->blockscale= 0.7;
+ stime->redraws= TIME_ALL_3D_WIN|TIME_ALL_ANIM_WIN;
stime->v2d.tot.xmin= -4.0;
stime->v2d.tot.ymin= 0.0;
- stime->v2d.tot.xmax= 250.0;
+ stime->v2d.tot.xmax= (float)EFRA + 4.0;
stime->v2d.tot.ymax= (float)sa->winy;
- stime->v2d.cur.xmin= -4.0;
- stime->v2d.cur.ymin= 0.0;
- stime->v2d.cur.xmax= 50.0;
- stime->v2d.cur.ymax= (float)sa->winy;
+ stime->v2d.cur= stime->v2d.tot;
stime->v2d.min[0]= 1.0;
stime->v2d.min[1]= (float)sa->winy;
@@ -4763,6 +4763,11 @@ void allqueue(unsigned short event, short val)
scrarea_queue_winredraw(sa);
}
break;
+ case REDRAWANIM:
+ if ELEM6(sa->spacetype, SPACE_IPO, SPACE_SOUND, SPACE_TIME, SPACE_NLA, SPACE_ACTION, SPACE_SEQ) {
+ scrarea_queue_winredraw(sa);
+ if(val) scrarea_queue_headredraw(sa);
+ }
}
}
sa= sa->next;
@@ -4870,7 +4875,7 @@ void force_draw(int header)
}
-/* if header==1, then draw header for curarea too. Excepption for headerprint()... */
+/* if header==1, then draw header for curarea too. Exception for headerprint()... */
void force_draw_plus(int type, int header)
{
/* draws all areas that show something like curarea AND areas of 'type' */