diff options
author | Campbell Barton <campbell@blender.org> | 2022-02-03 13:32:50 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-02-03 13:37:42 +0300 |
commit | 35aedd87e78d44aa0a622d26261ecac7ece12925 (patch) | |
tree | 20c3925988d25ea027f4c5b039e0b4ba547ac3f9 /source/blender/editors/screen/screen_ops.c | |
parent | 98cc3c6009ad0267c4f7b7da7e8725613cb32d31 (diff) |
Fix T66913: undo after frame-change doesn't refresh properly
Use the ID.recalc flag to detect when updates after frame-change is
needed. Since comparing the last calculated frame doesn't take undo into
account (see code-comment for details).
`ID_RECALC_AUDIO_SEEK` has been renamed to `ID_RECALC_FRAME_CHANGE`
since this is not only related to audio however internally this flag is
still categorized in `NodeType::AUDIO`.
Reviewed By: sergey
Ref D13942
Diffstat (limited to 'source/blender/editors/screen/screen_ops.c')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 6581bffb6bd..152a5c87c78 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2986,7 +2986,7 @@ static int frame_offset_exec(bContext *C, wmOperator *op) areas_do_frame_follow(C, false); - DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_SEEK); + DEG_id_tag_update(&scene->id, ID_RECALC_FRAME_CHANGE); WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); @@ -3047,7 +3047,7 @@ static int frame_jump_exec(bContext *C, wmOperator *op) areas_do_frame_follow(C, true); - DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_SEEK); + DEG_id_tag_update(&scene->id, ID_RECALC_FRAME_CHANGE); WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); } @@ -3161,7 +3161,7 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op) areas_do_frame_follow(C, true); - DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_SEEK); + DEG_id_tag_update(&scene->id, ID_RECALC_FRAME_CHANGE); WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); @@ -3225,7 +3225,7 @@ static int marker_jump_exec(bContext *C, wmOperator *op) areas_do_frame_follow(C, true); - DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_SEEK); + DEG_id_tag_update(&scene->id, ID_RECALC_FRAME_CHANGE); WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); @@ -4626,7 +4626,7 @@ static int screen_animation_step_invoke(bContext *C, wmOperator *UNUSED(op), con if (scene_eval == NULL) { /* Happens when undo/redo system is used during playback, nothing meaningful we can do here. */ } - else if (scene_eval->id.recalc & ID_RECALC_AUDIO_SEEK) { + else if (scene_eval->id.recalc & ID_RECALC_FRAME_CHANGE) { /* Ignore seek here, the audio will be updated to the scene frame after jump during next * dependency graph update. */ } @@ -4741,7 +4741,7 @@ static int screen_animation_step_invoke(bContext *C, wmOperator *UNUSED(op), con } if (sad->flag & ANIMPLAY_FLAG_JUMPED) { - DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_SEEK); + DEG_id_tag_update(&scene->id, ID_RECALC_FRAME_CHANGE); #ifdef PROFILE_AUDIO_SYNCH old_frame = CFRA; #endif |