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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-02-28 13:04:57 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-02-28 13:04:57 +0400
commitd2a5ea04ed8448865b4daa21c0010727eee118ba (patch)
treee053618c73696de0b950c8e9232af78a77bcfe54
parent96a51e99fb8a5dcb9e6b15eed876d7ea6f1cc94b (diff)
Fix T38467: Animation playback is not synchronized when Screen Layout changes
When both old and new screens share the same scene, "transfer" playback to new screen, else stop playback.
-rw-r--r--source/blender/editors/screen/screen_edit.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 86e78396fdf..66fa5787e5d 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1518,8 +1518,17 @@ void ED_screen_set(bContext *C, bScreen *sc)
WM_event_timer_sleep(wm, win, wt, true);
ED_screen_exit(C, win, oldscreen);
- oldscreen->animtimer = wt;
-
+
+ /* Same scene, "transfer" playback to new screen. */
+ if (oldscene == sc->scene) {
+ sc->animtimer = wt;
+ }
+ /* Else, stop playback. */
+ else {
+ oldscreen->animtimer = wt;
+ ED_screen_animation_play(C, 0, 0);
+ }
+
win->screen = sc;
CTX_wm_window_set(C, win); // stores C->wm.screen... hrmf