[Bf-blender-cvs] [2ec0d53] master: Fix VSE not able to playback after scrubbing (and a couple of crashes)

Julian Eisel noreply at git.blender.org
Sun Aug 2 00:15:22 CEST 2015


Commit: 2ec0d53034aff2725d09a911577bbc013b6c06e8
Author: Julian Eisel
Date:   Sat Aug 1 23:55:33 2015 +0200
Branches: master
https://developer.blender.org/rB2ec0d53034aff2725d09a911577bbc013b6c06e8

Fix VSE not able to playback after scrubbing (and a couple of crashes)

After scrubbing, Blender kept thinking an animation is played (see animation "Play" button), even after mouse release. This resulted in a couple of crashes, e.g. by pressing Alt+a and then Esc.

(Also minor cleanup)

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

M	source/blender/editors/animation/anim_ops.c

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

diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index 20d1dbe..835a8f8 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -148,24 +148,34 @@ static void change_frame_seq_preview_begin(bContext *C, const wmEvent *event)
 {
 	ScrArea *sa = CTX_wm_area(C);
 	if (sa && sa->spacetype == SPACE_SEQ) {
-		wmWindow *win = CTX_wm_window(C);
+		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 (win->screen)
-			win->screen->scrubbing = true;
+		if (screen)
+			screen->scrubbing = true;
 	}
 }
+
 static void change_frame_seq_preview_end(bContext *C)
 {
+	bScreen *screen = CTX_wm_screen(C);
+	bool notify = false;
+
+	if (screen->scrubbing) {
+		screen->scrubbing = false;
+		notify = true;
+	}
+
 	if (ED_sequencer_special_preview_get() != NULL) {
-		wmWindow *win = CTX_wm_window(C);
-		Scene *scene = CTX_data_scene(C);
 		ED_sequencer_special_preview_clear();
+		notify = true;
+	}
+
+	if (notify) {
+		Scene *scene = CTX_data_scene(C);
 		WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
-		if (win->screen)
-			win->screen->scrubbing = false;
 	}
 }




More information about the Bf-blender-cvs mailing list