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/render/intern/source/pipeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/render') diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 86c9c64098b..41d20fa994a 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -1857,7 +1857,7 @@ static void update_physics_cache(Render *re, baker.bmain = re->main; baker.scene = scene; baker.view_layer = view_layer; - baker.depsgraph = BKE_scene_get_depsgraph(re->main, scene, view_layer, true); + baker.depsgraph = BKE_scene_ensure_depsgraph(re->main, scene, view_layer); baker.bake = 0; baker.render = 1; baker.anim_init = 1; -- cgit v1.2.3