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/editors/space_info
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/editors/space_info')
-rw-r--r--source/blender/editors/space_info/info_header.c12
-rw-r--r--source/blender/editors/space_info/space_info.c3
2 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/editors/space_info/info_header.c b/source/blender/editors/space_info/info_header.c
index af792d0b22c..aa6aadd00bc 100644
--- a/source/blender/editors/space_info/info_header.c
+++ b/source/blender/editors/space_info/info_header.c
@@ -72,8 +72,9 @@ static int error() {return 0;}
/* ************************ header area region *********************** */
-#define B_STOPRENDER 1
-#define B_STOPCAST 2
+#define B_STOPRENDER 1
+#define B_STOPCAST 2
+#define B_STOPANIM 3
static void do_viewmenu(bContext *C, void *arg, int event)
{
@@ -328,6 +329,9 @@ static void do_info_buttons(bContext *C, void *arg, int event)
case B_STOPCAST:
WM_jobs_stop(CTX_wm_manager(C), CTX_wm_screen(C));
break;
+ case B_STOPANIM:
+ ED_screen_animation_timer(C, 0, 0);
+ break;
}
}
@@ -444,6 +448,10 @@ void info_header_buttons(const bContext *C, ARegion *ar)
uiDefIconTextBut(block, BUT, B_STOPCAST, ICON_REC, "Capture", xco+5,yco,85,19, NULL, 0.0f, 0.0f, 0, 0, "Stop screencast");
xco+= 90;
}
+ if(screen->animtimer) {
+ uiDefIconTextBut(block, BUT, B_STOPANIM, ICON_REC, "Anim Player", xco+5,yco,85,19, NULL, 0.0f, 0.0f, 0, 0, "Stop animation playback");
+ xco+= 90;
+ }
/* always as last */
UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin);
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index 12f23f03e66..d72ecd60da9 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -43,6 +43,7 @@
#include "BKE_context.h"
#include "BKE_colortools.h"
#include "BKE_screen.h"
+#include "BKE_utildefines.h"
#include "ED_space_api.h"
#include "ED_screen.h"
@@ -196,7 +197,7 @@ static void info_header_listener(ARegion *ar, wmNotifier *wmn)
/* context changes */
switch(wmn->category) {
case NC_SCREEN:
- if(wmn->data==ND_SCREENCAST)
+ if(ELEM(wmn->data, ND_SCREENCAST, ND_ANIMPLAY))
ED_region_tag_redraw(ar);
break;
case NC_SCENE: