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.
This commit is contained in:
@@ -246,7 +246,7 @@ static PyObject *bpygpu_offscreen_draw_view3d(BPyGPUOffScreen *self,
|
||||
|
||||
BLI_assert(BKE_id_is_in_global_main(&scene->id));
|
||||
|
||||
depsgraph = BKE_scene_get_depsgraph(G_MAIN, scene, view_layer, true);
|
||||
depsgraph = BKE_scene_ensure_depsgraph(G_MAIN, scene, view_layer);
|
||||
|
||||
rv3d_mats = ED_view3d_mats_rv3d_backup(region->regiondata);
|
||||
|
||||
|
Reference in New Issue
Block a user