Fix: avoid extra depsgraph evaluation when stopping animation playback
The `NC_SCENE | ND_FRAME` was originally added so that the sequencer
preview is redrawn so that the fps stops showing (2855485565).
Using this specific notifier has the side effect that it also causes a depsgraph
update in `wm_event_do_notifiers`. However, that is not necessary just to
trigger the redraw. Using the `NC_SPACE | ND_SPACE_SEQUENCER` notifier
also triggers the redraw without causing a depsgraph update.
This commit is contained in:
@@ -4863,7 +4863,9 @@ int ED_screen_animation_play(bContext *C, int sync, int mode)
|
||||
ED_screen_animation_timer(C, 0, 0, 0);
|
||||
BKE_sound_stop_scene(scene_eval);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
|
||||
/* Triggers redraw of sequencer preview so that it does not show to fps anymore after stopping
|
||||
* playback. */
|
||||
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_SEQUENCER, scene);
|
||||
}
|
||||
else {
|
||||
/* these settings are currently only available from a menu in the TimeLine */
|
||||
|
||||
Reference in New Issue
Block a user