diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-06 13:07:27 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-16 20:55:33 +0300 |
commit | 34ab90f546f097cada951b2c9ca22bf271996980 (patch) | |
tree | ebcdb3d37120ac1d8fb16462b9104badd1800329 /source/blender/alembic/intern/abc_mball.cc | |
parent | 0c495005dd83913864acb510c1d4194a2275dbb0 (diff) |
Depsgraph: remove EvaluationContext, pass Depsgraph instead.
The depsgraph was always created within a fixed evaluation context. Passing
both risks the depsgraph and evaluation context not matching, and it
complicates the Python API where we'd have to expose both which is not so
easy to understand.
This also removes the global evaluation context in main, which assumed there
to be a single active scene and view layer.
Differential Revision: https://developer.blender.org/D3152
Diffstat (limited to 'source/blender/alembic/intern/abc_mball.cc')
-rw-r--r-- | source/blender/alembic/intern/abc_mball.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/alembic/intern/abc_mball.cc b/source/blender/alembic/intern/abc_mball.cc index f1aa25c8f70..1df55712abe 100644 --- a/source/blender/alembic/intern/abc_mball.cc +++ b/source/blender/alembic/intern/abc_mball.cc @@ -42,13 +42,13 @@ extern "C" { AbcMBallWriter::AbcMBallWriter( Main *bmain, - EvaluationContext *eval_ctx, + Depsgraph *depsgraph, Scene *scene, Object *ob, AbcTransformWriter *parent, uint32_t time_sampling, ExportSettings &settings) - : AbcObjectWriter(eval_ctx, scene, ob, time_sampling, settings, parent) + : AbcObjectWriter(depsgraph, scene, ob, time_sampling, settings, parent) , m_bmain(bmain) { m_is_animated = isAnimated(); @@ -58,7 +58,7 @@ AbcMBallWriter::AbcMBallWriter( sizeof(CurveCache), "CurveCache for AbcMBallWriter"); - m_mesh_writer = new AbcMeshWriter(eval_ctx, scene, m_mesh_ob, parent, + m_mesh_writer = new AbcMeshWriter(depsgraph, scene, m_mesh_ob, parent, time_sampling, settings); m_mesh_writer->setIsAnimated(m_is_animated); } @@ -97,13 +97,11 @@ void AbcMBallWriter::do_write() id_us_min(&tmpmesh->id); ListBase disp = {NULL, NULL}; - /* TODO(sergey): This is gonna to work for until EvaluationContext + /* TODO(sergey): This is gonna to work for until Depsgraph * only contains for_render flag. As soon as CoW is * implemented, this is to be rethinked. */ - EvaluationContext eval_ctx; - DEG_evaluation_context_init(&eval_ctx, DAG_EVAL_RENDER); - BKE_displist_make_mball_forRender(&eval_ctx, m_scene, m_object, &disp); + BKE_displist_make_mball_forRender(m_depsgraph, m_scene, m_object, &disp); BKE_mesh_from_metaball(&disp, tmpmesh); BKE_displist_free(&disp); |