diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-06-08 12:52:36 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-06-08 12:53:03 +0300 |
commit | 691282e5712e7dc7a8bec2091a84ab80e4bd3095 (patch) | |
tree | 48e8043c26d7d5cc91fa8401db8cbb71e5a948c6 /source/blender/alembic | |
parent | 346a1d445e08e9fd55727b217c236ba0457d137d (diff) |
Alembic export: create render-evaluated depsgraph for exporting
Previously the context depsgraph was used, which (most likely) uses
viewport evaluation instead of render evaluation.
Diffstat (limited to 'source/blender/alembic')
-rw-r--r-- | source/blender/alembic/intern/alembic_capi.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/alembic/intern/alembic_capi.cc b/source/blender/alembic/intern/alembic_capi.cc index b3232b37117..cc9923189c7 100644 --- a/source/blender/alembic/intern/alembic_capi.cc +++ b/source/blender/alembic/intern/alembic_capi.cc @@ -260,6 +260,12 @@ static void export_startjob(void *customdata, short *stop, short *do_update, flo G.is_break = false; + DEG_graph_build_from_view_layer(data->settings.depsgraph, + data->bmain, + data->settings.scene, + data->view_layer); + BKE_scene_graph_update_tagged(data->settings.depsgraph, data->bmain); + try { AbcExporter exporter(data->bmain, data->filename, data->settings); @@ -333,13 +339,13 @@ bool ABC_export( * hardcore refactoring. */ new (&job->settings) ExportSettings(); job->settings.scene = scene; - job->settings.depsgraph = CTX_data_depsgraph(C); + job->settings.depsgraph = DEG_graph_new(scene, job->view_layer, DAG_EVAL_RENDER); /* Sybren: for now we only export the active scene layer. * Later in the 2.8 development process this may be replaced by using * a specific collection for Alembic I/O, which can then be toggled * between "real" objects and cached Alembic files. */ - job->settings.view_layer = CTX_data_view_layer(C); + job->settings.view_layer = job->view_layer; job->settings.frame_start = params->frame_start; job->settings.frame_end = params->frame_end; |