diff options
author | Jacques Lucke <jacques@blender.org> | 2020-08-18 16:45:58 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-08-18 16:45:58 +0300 |
commit | d9f7cbb8af07b27d3825453a036557a0e0dab37b (patch) | |
tree | ab540af9f4f3d14206b5ec984bf02dc8c9b31993 /source/blender/blenkernel | |
parent | f653a4f34997adbb856db0aad49ffe72111603e4 (diff) |
Cleanup: remove bmain argument from BKE_scene_graph_update_for_newframe
Reviewers: sergey
Differential Revision: https://developer.blender.org/D8613
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_scene.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pointcache.c | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h index 8cd86593873..e3bd57e75e3 100644 --- a/source/blender/blenkernel/BKE_scene.h +++ b/source/blender/blenkernel/BKE_scene.h @@ -145,7 +145,7 @@ void BKE_scene_update_tag_audio_volume(struct Depsgraph *, struct Scene *scene); void BKE_scene_graph_update_tagged(struct Depsgraph *depsgraph, struct Main *bmain); void BKE_scene_graph_evaluated_ensure(struct Depsgraph *depsgraph, struct Main *bmain); -void BKE_scene_graph_update_for_newframe(struct Depsgraph *depsgraph, struct Main *bmain); +void BKE_scene_graph_update_for_newframe(struct Depsgraph *depsgraph); void BKE_scene_view_layer_graph_evaluated_ensure(struct Main *bmain, struct Scene *scene, diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 64e642462af..8c5915d3768 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -4025,7 +4025,6 @@ static void ptcache_dt_to_str(char *str, double dtime) /* if bake is not given run simulations to current frame */ void BKE_ptcache_bake(PTCacheBaker *baker) { - Main *bmain = baker->bmain; Scene *scene = baker->scene; ViewLayer *view_layer = baker->view_layer; struct Depsgraph *depsgraph = baker->depsgraph; @@ -4156,7 +4155,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker) stime = ptime = PIL_check_seconds_timer(); for (int fr = CFRA; fr <= endframe; fr += baker->quick_step, CFRA = fr) { - BKE_scene_graph_update_for_newframe(depsgraph, bmain); + BKE_scene_graph_update_for_newframe(depsgraph); if (baker->update_progress) { float progress = ((float)(CFRA - startframe) / (float)(endframe - startframe)); @@ -4255,7 +4254,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker) CFRA = cfrao; if (bake) { /* already on cfra unless baking */ - BKE_scene_graph_update_for_newframe(depsgraph, bmain); + BKE_scene_graph_update_for_newframe(depsgraph); } /* TODO: call redraw all windows somehow */ diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 7e25e8c96ae..f95ee27ed58 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1541,10 +1541,11 @@ void BKE_scene_graph_evaluated_ensure(Depsgraph *depsgraph, Main *bmain) } /* applies changes right away, does all sets too */ -void BKE_scene_graph_update_for_newframe(Depsgraph *depsgraph, Main *bmain) +void BKE_scene_graph_update_for_newframe(Depsgraph *depsgraph) { Scene *scene = DEG_get_input_scene(depsgraph); ViewLayer *view_layer = DEG_get_input_view_layer(depsgraph); + Main *bmain = DEG_get_bmain(depsgraph); /* Keep this first. */ BKE_callback_exec_id(bmain, &scene->id, BKE_CB_EVT_FRAME_CHANGE_PRE); diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index a2a45ae56b3..b4da0c5bd33 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -3593,7 +3593,7 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, /* opengl offscreen render */ depsgraph = BKE_scene_get_depsgraph(context->bmain, scene, view_layer, true); - BKE_scene_graph_update_for_newframe(depsgraph, context->bmain); + BKE_scene_graph_update_for_newframe(depsgraph); ibuf = sequencer_view3d_fn( /* set for OpenGL render (NULL when scrubbing) */ depsgraph, @@ -3695,7 +3695,7 @@ finally: scene->r.subframe = orig_data.subframe; if (is_frame_update && (depsgraph != NULL)) { - BKE_scene_graph_update_for_newframe(depsgraph, context->bmain); + BKE_scene_graph_update_for_newframe(depsgraph); } #ifdef DURIAN_CAMERA_SWITCH |