Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-11-03 16:36:49 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-11-03 16:36:49 +0300
commit0ba0993f18c135f260a8278a911185452011fea4 (patch)
tree4463c50e403116c17f1753cd8100cd9aa076a306 /source/blender/windowmanager
parent95ccaed9e652f20a97d0a4d63ac3c9825944c897 (diff)
Depsgraph: Port more areas to direct depsgraph API
This is a lots of changes, but they are boiling down to a simple API changes where we are no longer relying on implicit usage of scene's depsgraph and pass depsgraph explicitly. There should be no user measurable difference, render_layer* tests are also passing.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c6
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c9
2 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 2c3d36cdcfb..7167e61fccd 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -394,12 +394,12 @@ void wm_event_do_notifiers(bContext *C)
if (do_anim) {
/* XXX, quick frame changes can cause a crash if framechange and rendering
- * collide (happens on slow scenes), BKE_scene_update_for_newframe can be called
+ * collide (happens on slow scenes), BKE_scene_graph_update_for_newframe can be called
* twice which can depgraph update the same object at once */
if (G.is_rendering == false) {
/* depsgraph gets called, might send more notifiers */
- ED_update_for_newframe(CTX_data_main(C), scene);
+ ED_update_for_newframe(CTX_data_main(C), scene, CTX_data_depsgraph(C));
}
}
}
@@ -2619,7 +2619,7 @@ void wm_event_do_handlers(bContext *C)
int ncfra = time * (float)FPS + 0.5f;
if (ncfra != scene->r.cfra) {
scene->r.cfra = ncfra;
- ED_update_for_newframe(CTX_data_main(C), scene);
+ ED_update_for_newframe(CTX_data_main(C), scene, CTX_data_depsgraph(C));
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 814be6a1d32..8600bc63cb7 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -3240,7 +3240,7 @@ static const EnumPropertyItem redraw_timer_type_items[] = {
static void redraw_timer_step(
- bContext *C, Main *bmain, Scene *scene,
+ bContext *C, Main *bmain, Scene *scene, struct Depsgraph *depsgraph,
wmWindow *win, ScrArea *sa, ARegion *ar,
const int type, const int cfra)
{
@@ -3287,7 +3287,7 @@ static void redraw_timer_step(
}
else if (type == eRTAnimationStep) {
scene->r.cfra += (cfra == scene->r.cfra) ? 1 : -1;
- BKE_scene_update_for_newframe(bmain->eval_ctx, bmain, scene);
+ BKE_scene_graph_update_for_newframe(bmain->eval_ctx, depsgraph, bmain, scene);
}
else if (type == eRTAnimationPlay) {
/* play anim, return on same frame as started with */
@@ -3299,7 +3299,7 @@ static void redraw_timer_step(
if (scene->r.cfra > scene->r.efra)
scene->r.cfra = scene->r.sfra;
- BKE_scene_update_for_newframe(bmain->eval_ctx, bmain, scene);
+ BKE_scene_graph_update_for_newframe(bmain->eval_ctx, depsgraph, bmain, scene);
redraw_timer_window_swap(C);
}
}
@@ -3323,13 +3323,14 @@ static int redraw_timer_exec(bContext *C, wmOperator *op)
const int cfra = scene->r.cfra;
int a, iter_steps = 0;
const char *infostr = "";
+ struct Depsgraph *depsgraph = CTX_data_depsgraph(C);
WM_cursor_wait(1);
time_start = PIL_check_seconds_timer();
for (a = 0; a < iter; a++) {
- redraw_timer_step(C, bmain, scene, 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) {