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:
authorAntonioya <blendergit@gmail.com>2019-07-23 10:46:29 +0300
committerAntonioya <blendergit@gmail.com>2019-07-23 10:46:29 +0300
commit2204bfcf9e1c3a38e60830bd97775dd72158f4d6 (patch)
tree4f9c827389a23a431f8771b4ca02f410860c0242 /source/blender/windowmanager/intern/wm_event_system.c
parentf64db794ee690f05905ace0a66d81d2e75549b90 (diff)
parent34ad6da4a06ef46cd19945f61cc5f968538546a8 (diff)
Merge branch 'master' into temp-gpencil-drw-engine
Diffstat (limited to 'source/blender/windowmanager/intern/wm_event_system.c')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 24040568b7b..76cb78b1e04 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -98,7 +98,7 @@
* Without tools using press events which would prevent click/drag events getting to the gizmos.
*
* This is not a fool proof solution since since it's possible the gizmo operators would pass
- * through thse events when called, see: T65479.
+ * through these events when called, see: T65479.
*/
#define USE_GIZMO_MOUSE_PRIORITY_HACK
@@ -3235,18 +3235,34 @@ void wm_event_do_handlers(bContext *C)
if (scene_eval != NULL) {
const int is_playing_sound = BKE_sound_scene_playing(scene_eval);
- if (is_playing_sound != -1) {
+ if (scene_eval->id.recalc & ID_RECALC_AUDIO_SEEK) {
+ /* Ignore seek here, the audio will be updated to the scene frame after jump during next
+ * dependency graph update. */
+ }
+ else if (is_playing_sound != -1) {
bool is_playing_screen;
is_playing_screen = (ED_screen_animation_playing(wm) != NULL);
if (((is_playing_sound == 1) && (is_playing_screen == 0)) ||
((is_playing_sound == 0) && (is_playing_screen == 1))) {
+ wmWindow *context_old_win = CTX_wm_window(C);
+ bScreen *context_screen_win = CTX_wm_screen(C);
+ Scene *context_scene_win = CTX_data_scene(C);
+
+ CTX_wm_window_set(C, win);
+ CTX_wm_screen_set(C, screen);
+ CTX_data_scene_set(C, scene);
+
ED_screen_animation_play(C, -1, 1);
+
+ CTX_data_scene_set(C, context_scene_win);
+ CTX_wm_screen_set(C, context_screen_win);
+ CTX_wm_window_set(C, context_old_win);
}
if (is_playing_sound == 0) {
- const float time = BKE_sound_sync_scene(scene);
+ const float time = BKE_sound_sync_scene(scene_eval);
if (isfinite(time)) {
int ncfra = time * (float)FPS + 0.5f;
if (ncfra != scene->r.cfra) {