From 3bc09c1c1ec9c1699ac872bc643d3e38c250803f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 21 Aug 2020 11:56:03 +0200 Subject: 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. --- source/blender/editors/render/render_update.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/render') diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c index 7d0ad42c703..ce454d5eac2 100644 --- a/source/blender/editors/render/render_update.c +++ b/source/blender/editors/render/render_update.c @@ -194,7 +194,7 @@ void ED_render_engine_changed(Main *bmain, const bool update_scene_data) update_ctx.scene = scene; LISTBASE_FOREACH (ViewLayer *, view_layer, &scene->view_layers) { /* TDODO(sergey): Iterate over depsgraphs instead? */ - update_ctx.depsgraph = BKE_scene_get_depsgraph(bmain, scene, view_layer, true); + update_ctx.depsgraph = BKE_scene_ensure_depsgraph(bmain, scene, view_layer); update_ctx.view_layer = view_layer; ED_render_id_flush_update(&update_ctx, &scene->id); } -- cgit v1.2.3