[Bf-blender-cvs] [9becee4] master: Fix scrubbing only treated as animation for sequencer

Antony Riakiotakis noreply at git.blender.org
Fri Aug 7 15:40:06 CEST 2015


Commit: 9becee445ee525a7831e28567f041b4477d0c9ba
Author: Antony Riakiotakis
Date:   Fri Aug 7 15:39:32 2015 +0200
Branches: master
https://developer.blender.org/rB9becee445ee525a7831e28567f041b4477d0c9ba

Fix scrubbing only treated as animation for sequencer

Intent was to act as animation everywhere

===================================================================

M	source/blender/editors/animation/anim_ops.c
M	source/blender/editors/space_graph/graph_ops.c
M	source/blender/editors/space_view3d/view3d_draw.c

===================================================================

diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index 835a8f8..262ce0b 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -147,15 +147,15 @@ static int frame_from_event(bContext *C, const wmEvent *event)
 static void change_frame_seq_preview_begin(bContext *C, const wmEvent *event)
 {
 	ScrArea *sa = CTX_wm_area(C);
+	bScreen *screen = CTX_wm_screen(C);
 	if (sa && sa->spacetype == SPACE_SEQ) {
-		bScreen *screen = CTX_wm_screen(C);
 		SpaceSeq *sseq = sa->spacedata.first;
 		if (ED_space_sequencer_check_show_strip(sseq)) {
 			ED_sequencer_special_preview_set(C, event->mval);
 		}
-		if (screen)
-			screen->scrubbing = true;
 	}
+	if (screen)
+		screen->scrubbing = true;
 }
 
 static void change_frame_seq_preview_end(bContext *C)
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index 93773a1..8e5c85d 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -139,7 +139,7 @@ static void graphview_cursor_setprops(bContext *C, wmOperator *op, const wmEvent
 /* Modal Operator init */
 static int graphview_cursor_invoke(bContext *C, wmOperator *op, const wmEvent *event)
 {
-	wmWindow *win = CTX_wm_window(C);
+	bScreen *screen = CTX_wm_screen(C);
 	/* Change to frame that mouse is over before adding modal handler,
 	 * as user could click on a single frame (jump to frame) as well as
 	 * click-dragging over a range (modal scrubbing).
@@ -149,8 +149,8 @@ static int graphview_cursor_invoke(bContext *C, wmOperator *op, const wmEvent *e
 	/* apply these changes first */
 	graphview_cursor_apply(C, op);
 	
-	if (win->screen)
-		win->screen->scrubbing = true;
+	if (screen)
+		screen->scrubbing = true;
 
 	/* add temp handler */
 	WM_event_add_modal_handler(C, op);
@@ -160,12 +160,12 @@ static int graphview_cursor_invoke(bContext *C, wmOperator *op, const wmEvent *e
 /* Modal event handling of cursor changing */
 static int graphview_cursor_modal(bContext *C, wmOperator *op, const wmEvent *event)
 {
-	wmWindow *win = CTX_wm_window(C);
+	bScreen *screen = CTX_wm_screen(C);
 	/* execute the events */
 	switch (event->type) {
 		case ESCKEY:
-			if (win->screen)
-				win->screen->scrubbing = false;
+			if (screen)
+				screen->scrubbing = false;
 			return OPERATOR_FINISHED;
 		
 		case MOUSEMOVE:
@@ -181,8 +181,8 @@ static int graphview_cursor_modal(bContext *C, wmOperator *op, const wmEvent *ev
 			 * the modal op) doesn't work for some reason
 			 */
 			if (event->val == KM_RELEASE) {
-				if (win->screen)
-					win->screen->scrubbing = false;
+				if (screen)
+					screen->scrubbing = false;
 				return OPERATOR_FINISHED;
 			}
 			break;
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 0f4e05c..7f553fe 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -3877,7 +3877,7 @@ static void view3d_main_area_draw_info(const bContext *C, Scene *scene,
 	if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
 		wmWindowManager *wm = CTX_wm_manager(C);
 
-		if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_playing(wm)) {
+		if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_no_scrub(wm)) {
 			ED_scene_draw_fps(scene, &rect);
 		}
 		else if (U.uiflag & USER_SHOW_VIEWPORTNAME) {




More information about the Bf-blender-cvs mailing list