diff options
Diffstat (limited to 'source/blender/io/common')
3 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/io/common/IO_abstract_hierarchy_iterator.h b/source/blender/io/common/IO_abstract_hierarchy_iterator.h index 3c6b6cc631e..3371501db95 100644 --- a/source/blender/io/common/IO_abstract_hierarchy_iterator.h +++ b/source/blender/io/common/IO_abstract_hierarchy_iterator.h @@ -30,6 +30,7 @@ struct Depsgraph; struct DupliObject; struct ID; +struct Main; struct Object; struct ParticleSystem; @@ -204,12 +205,13 @@ class AbstractHierarchyIterator { protected: ExportGraph export_graph_; ExportPathMap duplisource_export_path_; + Main *bmain_; Depsgraph *depsgraph_; WriterMap writers_; ExportSubset export_subset_; public: - explicit AbstractHierarchyIterator(Depsgraph *depsgraph); + explicit AbstractHierarchyIterator(Main *bmain, Depsgraph *depsgraph); virtual ~AbstractHierarchyIterator(); /* Iterate over the depsgraph, create writers, and tell the writers to write. diff --git a/source/blender/io/common/intern/abstract_hierarchy_iterator.cc b/source/blender/io/common/intern/abstract_hierarchy_iterator.cc index f0501d4cf62..82bb1c57833 100644 --- a/source/blender/io/common/intern/abstract_hierarchy_iterator.cc +++ b/source/blender/io/common/intern/abstract_hierarchy_iterator.cc @@ -161,8 +161,8 @@ bool AbstractHierarchyWriter::check_has_deforming_physics(const HierarchyContext return rbo != nullptr && rbo->type == RBO_TYPE_ACTIVE && (rbo->flag & RBO_FLAG_USE_DEFORM) != 0; } -AbstractHierarchyIterator::AbstractHierarchyIterator(Depsgraph *depsgraph) - : depsgraph_(depsgraph), export_subset_({true, true}) +AbstractHierarchyIterator::AbstractHierarchyIterator(Main *bmain, Depsgraph *depsgraph) + : bmain_(bmain), depsgraph_(depsgraph), export_subset_({true, true}) { } 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 52cae89c2e8..81a3546259e 100644 --- a/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc +++ b/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc @@ -54,7 +54,8 @@ class TestingHierarchyIterator : public AbstractHierarchyIterator { used_writers hair_writers; used_writers particle_writers; - explicit TestingHierarchyIterator(Depsgraph *depsgraph) : AbstractHierarchyIterator(depsgraph) + explicit TestingHierarchyIterator(Main *bmain, Depsgraph *depsgraph) + : AbstractHierarchyIterator(bmain, depsgraph) { } ~TestingHierarchyIterator() override @@ -105,7 +106,7 @@ class AbstractHierarchyIteratorTest : public BlendfileLoadingBaseTest { /* Create a test iterator. */ void iterator_create() { - iterator = new TestingHierarchyIterator(depsgraph); + iterator = new TestingHierarchyIterator(bfile->main, depsgraph); } /* Free the test iterator if it is not nullptr. */ void iterator_free() |