diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-08-21 12:56:03 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-08-21 13:23:13 +0300 |
commit | 3bc09c1c1ec9c1699ac872bc643d3e38c250803f (patch) | |
tree | d9812280b0bf6e7f9b835d2e670063a26a9d4ffd /source/blender/editors/screen/screen_ops.c | |
parent | e7767ba6be99a85349975b8da37b8cb8b9a3d6a9 (diff) |
Cleanup: split `BKE_scene_get_depsgraph()` into two functions
Split the depsgraph allocation into a separate function
`BKE_scene_ensure_depsgraph()`. Parameters are only passed to those
functions that actually need them. This removes the the "if that boolean
is `false` this pointer is allowed to be `NULL`" logic and more cleanly
decouples code.
No functional changes.
Diffstat (limited to 'source/blender/editors/screen/screen_ops.c')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index b39b0ca7db6..0022e0ef7b7 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -4432,7 +4432,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), const wmEv Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = WM_window_get_active_view_layer(win); - Depsgraph *depsgraph = BKE_scene_get_depsgraph(bmain, scene, view_layer, false); + Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer); Scene *scene_eval = (depsgraph != NULL) ? DEG_get_evaluated_scene(depsgraph) : NULL; wmTimer *wt = screen->animtimer; ScreenAnimData *sad = wt->customdata; |