diff options
Diffstat (limited to 'source/blender/io/alembic/exporter/abc_export_capi.cc')
-rw-r--r-- | source/blender/io/alembic/exporter/abc_export_capi.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/io/alembic/exporter/abc_export_capi.cc b/source/blender/io/alembic/exporter/abc_export_capi.cc index 8c5f3d89870..c4966a965eb 100644 --- a/source/blender/io/alembic/exporter/abc_export_capi.cc +++ b/source/blender/io/alembic/exporter/abc_export_capi.cc @@ -67,11 +67,17 @@ namespace io { namespace alembic { // Construct the depsgraph for exporting. -static void build_depsgraph(Depsgraph *depsgraph, Main *bmain) +static void build_depsgraph(Depsgraph *depsgraph, Main *bmain, const bool visible_objects_only) { Scene *scene = DEG_get_input_scene(depsgraph); ViewLayer *view_layer = DEG_get_input_view_layer(depsgraph); - DEG_graph_build_from_view_layer(depsgraph, bmain, scene, view_layer); + + if (visible_objects_only) { + DEG_graph_build_from_view_layer(depsgraph, bmain, scene, view_layer); + } + else { + DEG_graph_build_for_all_objects(depsgraph, bmain, scene, view_layer); + } } static void export_startjob(void *customdata, @@ -91,7 +97,7 @@ static void export_startjob(void *customdata, *progress = 0.0f; *do_update = true; - build_depsgraph(data->depsgraph, data->bmain); + build_depsgraph(data->depsgraph, data->bmain, data->params.visible_objects_only); SubdivModifierDisabler subdiv_disabler(data->depsgraph); if (!data->params.apply_subdiv) { subdiv_disabler.disable_modifiers(); |