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/windowmanager/xr/intern/wm_xr_session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/windowmanager/xr') diff --git a/source/blender/windowmanager/xr/intern/wm_xr_session.c b/source/blender/windowmanager/xr/intern/wm_xr_session.c index 78dadbf9513..b9ef40e3398 100644 --- a/source/blender/windowmanager/xr/intern/wm_xr_session.c +++ b/source/blender/windowmanager/xr/intern/wm_xr_session.c @@ -195,7 +195,7 @@ static void wm_xr_session_scene_and_evaluated_depsgraph_get(Main *bmain, Scene *scene = WM_window_get_active_scene(root_win); ViewLayer *view_layer = WM_window_get_active_view_layer(root_win); - Depsgraph *depsgraph = BKE_scene_get_depsgraph(bmain, scene, view_layer, false); + Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer); BLI_assert(scene && view_layer && depsgraph); BKE_scene_graph_evaluated_ensure(depsgraph, bmain); *r_scene = scene; -- cgit v1.2.3