From 35aedd87e78d44aa0a622d26261ecac7ece12925 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 3 Feb 2022 21:32:50 +1100 Subject: 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 --- source/blender/editors/space_clip/clip_ops.c | 2 +- source/blender/editors/space_clip/tracking_ops.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_clip') diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index 03b6d8c7381..b45eabdc7c3 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -1082,7 +1082,7 @@ static void change_frame_apply(bContext *C, wmOperator *op) SUBFRA = 0.0f; /* do updates */ - 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); } diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index ee0406cde30..313887ec8fd 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -1385,7 +1385,7 @@ static int frame_jump_exec(bContext *C, wmOperator *op) if (CFRA != sc->user.framenr) { CFRA = sc->user.framenr; - 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); } -- cgit v1.2.3