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/scene/scene_edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/scene/scene_edit.c') diff --git a/source/blender/editors/scene/scene_edit.c b/source/blender/editors/scene/scene_edit.c index d599c1cbcf0..47edb322701 100644 --- a/source/blender/editors/scene/scene_edit.c +++ b/source/blender/editors/scene/scene_edit.c @@ -116,7 +116,7 @@ bool ED_scene_delete(bContext *C, Main *bmain, Scene *scene) /* Depsgraph updates after scene becomes active in a window. */ void ED_scene_change_update(Main *bmain, Scene *scene, ViewLayer *layer) { - Depsgraph *depsgraph = BKE_scene_get_depsgraph(bmain, scene, layer, true); + Depsgraph *depsgraph = BKE_scene_ensure_depsgraph(bmain, scene, layer); BKE_scene_set_background(bmain, scene); DEG_graph_relations_update(depsgraph); -- cgit v1.2.3