diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-06 12:21:20 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-13 15:17:37 +0300 |
commit | a1e2415ed51e2da97e3b182f18f462345a02ce14 (patch) | |
tree | 59d54c64e1e19bde4aab0d79aa2a51a66dabc877 /source/blender/windowmanager/intern | |
parent | eec5d3a8a8a26256fbae39d4f1fb01de6a648eea (diff) |
Depsgraph: don't pass evaluation context to update functions.
The depsgraph now contains all the state needed to evaluate it.
Differential Revision: https://developer.blender.org/D3147
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 8 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 9 |
2 files changed, 7 insertions, 10 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index fcf06804e94..6ec68614116 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -338,7 +338,7 @@ void wm_event_do_refresh_wm_and_depsgraph(bContext *C) WorkSpace *workspace = WM_window_get_active_workspace(win); - BKE_workspace_update_tagged(bmain->eval_ctx, bmain, workspace, scene); + BKE_workspace_update_tagged(bmain, workspace, scene); } } @@ -429,9 +429,8 @@ void wm_event_do_notifiers(bContext *C) * twice which can depgraph update the same object at once */ if (G.is_rendering == false) { /* depsgraph gets called, might send more notifiers */ - ViewLayer *view_layer = CTX_data_view_layer(C); Depsgraph *depsgraph = CTX_data_depsgraph(C); - ED_update_for_newframe(CTX_data_main(C), scene, view_layer, depsgraph); + ED_update_for_newframe(CTX_data_main(C), depsgraph); } } } @@ -2663,9 +2662,8 @@ void wm_event_do_handlers(bContext *C) int ncfra = time * (float)FPS + 0.5f; if (ncfra != scene->r.cfra) { scene->r.cfra = ncfra; - ViewLayer *view_layer = CTX_data_view_layer(C); Depsgraph *depsgraph = CTX_data_depsgraph(C); - ED_update_for_newframe(CTX_data_main(C), scene, view_layer, depsgraph); + ED_update_for_newframe(CTX_data_main(C), depsgraph); WM_event_add_notifier(C, NC_WINDOW, NULL); } } diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index e19ec6ca265..9679a55bc7a 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -3307,7 +3307,7 @@ static const EnumPropertyItem redraw_timer_type_items[] = { static void redraw_timer_step( - bContext *C, Main *bmain, Scene *scene, ViewLayer *view_layer, + bContext *C, Main *bmain, Scene *scene, struct Depsgraph *depsgraph, wmWindow *win, ScrArea *sa, ARegion *ar, const int type, const int cfra) @@ -3355,7 +3355,7 @@ static void redraw_timer_step( } else if (type == eRTAnimationStep) { scene->r.cfra += (cfra == scene->r.cfra) ? 1 : -1; - BKE_scene_graph_update_for_newframe(bmain->eval_ctx, depsgraph, bmain, scene, view_layer); + BKE_scene_graph_update_for_newframe(depsgraph, bmain); } else if (type == eRTAnimationPlay) { /* play anim, return on same frame as started with */ @@ -3367,7 +3367,7 @@ static void redraw_timer_step( if (scene->r.cfra > scene->r.efra) scene->r.cfra = scene->r.sfra; - BKE_scene_graph_update_for_newframe(bmain->eval_ctx, depsgraph, bmain, scene, view_layer); + BKE_scene_graph_update_for_newframe(depsgraph, bmain); redraw_timer_window_swap(C); } } @@ -3381,7 +3381,6 @@ static int redraw_timer_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - ViewLayer *view_layer = CTX_data_view_layer(C); wmWindow *win = CTX_wm_window(C); ScrArea *sa = CTX_wm_area(C); ARegion *ar = CTX_wm_region(C); @@ -3399,7 +3398,7 @@ static int redraw_timer_exec(bContext *C, wmOperator *op) time_start = PIL_check_seconds_timer(); for (a = 0; a < iter; a++) { - redraw_timer_step(C, bmain, scene, view_layer, depsgraph, win, sa, ar, type, cfra); + redraw_timer_step(C, bmain, scene, depsgraph, win, sa, ar, type, cfra); iter_steps += 1; if (time_limit != 0.0) { |