diff options
author | Jacques Lucke <jacques@blender.org> | 2020-08-18 16:51:32 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-08-18 16:51:32 +0300 |
commit | 6a4f5e6a8c3990330fe8839e39e0094ba5410ba4 (patch) | |
tree | 231d0dd3441ed6c11e801da68ab20d6694f191a7 /source/blender/io | |
parent | d9f7cbb8af07b27d3825453a036557a0e0dab37b (diff) |
Depsgraph: simplify build API
Reviewers: sergey, sybren
Differential Revision: https://developer.blender.org/D8611
Diffstat (limited to 'source/blender/io')
-rw-r--r-- | source/blender/io/alembic/exporter/abc_export_capi.cc | 11 | ||||
-rw-r--r-- | source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc | 3 | ||||
-rw-r--r-- | source/blender/io/usd/intern/usd_capi.cc | 5 |
3 files changed, 7 insertions, 12 deletions
diff --git a/source/blender/io/alembic/exporter/abc_export_capi.cc b/source/blender/io/alembic/exporter/abc_export_capi.cc index eeb13d31bd4..6412379c126 100644 --- a/source/blender/io/alembic/exporter/abc_export_capi.cc +++ b/source/blender/io/alembic/exporter/abc_export_capi.cc @@ -67,16 +67,13 @@ namespace io { namespace alembic { // Construct the depsgraph for exporting. -static void build_depsgraph(Depsgraph *depsgraph, Main *bmain, const bool visible_objects_only) +static void build_depsgraph(Depsgraph *depsgraph, const bool visible_objects_only) { - Scene *scene = DEG_get_input_scene(depsgraph); - ViewLayer *view_layer = DEG_get_input_view_layer(depsgraph); - if (visible_objects_only) { - DEG_graph_build_from_view_layer(depsgraph, bmain, scene, view_layer); + DEG_graph_build_from_view_layer(depsgraph); } else { - DEG_graph_build_for_all_objects(depsgraph, bmain, scene, view_layer); + DEG_graph_build_for_all_objects(depsgraph); } } @@ -97,7 +94,7 @@ static void export_startjob(void *customdata, *progress = 0.0f; *do_update = true; - build_depsgraph(data->depsgraph, data->bmain, data->params.visible_objects_only); + build_depsgraph(data->depsgraph, data->params.visible_objects_only); SubdivModifierDisabler subdiv_disabler(data->depsgraph); if (!data->params.apply_subdiv) { subdiv_disabler.disable_modifiers(); diff --git a/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc b/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc index 57bc68d25bf..27196994a3c 100644 --- a/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc +++ b/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc @@ -328,8 +328,7 @@ class AbstractHierarchyIteratorInvisibleTest : public AbstractHierarchyIteratorT { depsgraph = DEG_graph_new( bfile->main, bfile->curscene, bfile->cur_view_layer, depsgraph_evaluation_mode); - DEG_graph_build_for_all_objects( - depsgraph, bfile->main, bfile->curscene, bfile->cur_view_layer); + DEG_graph_build_for_all_objects(depsgraph); BKE_scene_graph_update_tagged(depsgraph, bfile->main); } }; diff --git a/source/blender/io/usd/intern/usd_capi.cc b/source/blender/io/usd/intern/usd_capi.cc index 1c23535e248..83b8c18d436 100644 --- a/source/blender/io/usd/intern/usd_capi.cc +++ b/source/blender/io/usd/intern/usd_capi.cc @@ -75,12 +75,11 @@ static void export_startjob(void *customdata, // Construct the depsgraph for exporting. Scene *scene = DEG_get_input_scene(data->depsgraph); - ViewLayer *view_layer = DEG_get_input_view_layer(data->depsgraph); if (data->params.visible_objects_only) { - DEG_graph_build_from_view_layer(data->depsgraph, data->bmain, scene, view_layer); + DEG_graph_build_from_view_layer(data->depsgraph); } else { - DEG_graph_build_for_all_objects(data->depsgraph, data->bmain, scene, view_layer); + DEG_graph_build_for_all_objects(data->depsgraph); } BKE_scene_graph_update_tagged(data->depsgraph, data->bmain); |