diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-09-09 15:49:05 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-09-11 11:43:27 +0300 |
commit | 73a199e96a68a5b9521ba7d3e8cca85697095c03 (patch) | |
tree | 53ddc33ae7e0ccfabc1d1566551f9ecfec2d9e75 /source/blender/makesrna/intern/rna_space_api.c | |
parent | 559df2fed9ad8e47b661aa79d033ab463ec3301e (diff) |
Depsgraph: Pass bmain to depsgraph object creation
Currently unused, but will allow to keep of an owner of the depsgraph.
Could also simplify other APIs in the future by avoiding to pass bmain
explicitly to relation update functions and things like that.
Diffstat (limited to 'source/blender/makesrna/intern/rna_space_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space_api.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_space_api.c b/source/blender/makesrna/intern/rna_space_api.c index 52a197240da..cbaa407646f 100644 --- a/source/blender/makesrna/intern/rna_space_api.c +++ b/source/blender/makesrna/intern/rna_space_api.c @@ -40,6 +40,7 @@ static void rna_RegionView3D_update(ID *id, RegionView3D *rv3d, bContext *C) area_region_from_regiondata(sc, rv3d, &sa, &ar); if (sa && ar && sa->spacetype == SPACE_VIEW3D) { + Main *bmain = CTX_data_main(C); View3D *v3d = sa->spacedata.first; wmWindowManager *wm = CTX_wm_manager(C); wmWindow *win; @@ -48,7 +49,7 @@ static void rna_RegionView3D_update(ID *id, RegionView3D *rv3d, bContext *C) if (WM_window_get_active_screen(win) == sc) { Scene *scene = WM_window_get_active_scene(win); ViewLayer *view_layer = WM_window_get_active_view_layer(win); - Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer, true); + Depsgraph *depsgraph = BKE_scene_get_depsgraph(bmain, scene, view_layer, true); ED_view3d_update_viewmat(depsgraph, scene, v3d, ar, NULL, NULL, NULL, false); break; |