diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-06 13:46:14 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-06 13:54:16 +0300 |
commit | 064273a4ae7101f937cf2e16b0e2f1efcd2f0e38 (patch) | |
tree | b10ee52c452decf2cd3ba760794609ee6795043b /source/blender/editors/screen | |
parent | 2c0da4a3db96d4aeeeec1cfba4a0a9f5bf0fa970 (diff) |
Sound: Port more cases to be a part of dependency graph
Mainly covers RNA callbacks which were still doing direct scene update,
which was causing crashes. Now corresponding ID_RECALC flags are used,
so all scenes can update accordingly.
Also tested animated volume/pitch on strips, which now works as well.
Fixes T64133: Assert after changing FPS
Fixes T64154: Immediate crash when changing the current frame on the timeline
Fixes T64185: Client Crashes when the frame position value is changed
Fixes T64190: Blender Crash using Timeline Editor
Fixes T64128: Click to close bug type on timeline
Fixes T64147: Crash when setting current frame from Python
Fixes T64152: Blender Auto-Close on timeline change
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 61fa05f243f..04bdaaa9482 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2759,7 +2759,6 @@ static void areas_do_frame_follow(bContext *C, bool middle) /* function to be called outside UI context, or for redo */ static int frame_offset_exec(bContext *C, wmOperator *op) { - Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); int delta; @@ -2771,7 +2770,7 @@ static int frame_offset_exec(bContext *C, wmOperator *op) areas_do_frame_follow(C, false); - BKE_sound_update_and_seek(bmain, CTX_data_depsgraph(C)); + DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_SEEK); WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); @@ -2803,7 +2802,6 @@ static void SCREEN_OT_frame_offset(wmOperatorType *ot) /* function to be called outside UI context, or for redo */ static int frame_jump_exec(bContext *C, wmOperator *op) { - Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); wmTimer *animtimer = CTX_wm_screen(C)->animtimer; @@ -2833,7 +2831,7 @@ static int frame_jump_exec(bContext *C, wmOperator *op) areas_do_frame_follow(C, true); - BKE_sound_update_and_seek(bmain, CTX_data_depsgraph(C)); + DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_SEEK); WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); } @@ -2866,7 +2864,6 @@ static void SCREEN_OT_frame_jump(wmOperatorType *ot) /* function to be called outside UI context, or for redo */ static int keyframe_jump_exec(bContext *C, wmOperator *op) { - Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); Object *ob = CTX_data_active_object(C); bDopeSheet ads = {NULL}; @@ -2949,7 +2946,7 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op) else { areas_do_frame_follow(C, true); - BKE_sound_update_and_seek(bmain, CTX_data_depsgraph(C)); + DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_SEEK); WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); @@ -2982,7 +2979,6 @@ static void SCREEN_OT_keyframe_jump(wmOperatorType *ot) /* function to be called outside UI context, or for redo */ static int marker_jump_exec(bContext *C, wmOperator *op) { - Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); TimeMarker *marker; int closest = CFRA; @@ -3016,7 +3012,7 @@ static int marker_jump_exec(bContext *C, wmOperator *op) areas_do_frame_follow(C, true); - BKE_sound_update_and_seek(bmain, CTX_data_depsgraph(C)); + DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_SEEK); WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); @@ -4403,7 +4399,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), const wmEv } if (sad->flag & ANIMPLAY_FLAG_JUMPED) { - BKE_sound_update_and_seek(bmain, depsgraph); + DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_SEEK); #ifdef PROFILE_AUDIO_SYNCH old_frame = CFRA; #endif |