diff options
Diffstat (limited to 'source/blender/io/common/intern/abstract_hierarchy_iterator.cc')
-rw-r--r-- | source/blender/io/common/intern/abstract_hierarchy_iterator.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/io/common/intern/abstract_hierarchy_iterator.cc b/source/blender/io/common/intern/abstract_hierarchy_iterator.cc index 82bb1c57833..1fbddc45964 100644 --- a/source/blender/io/common/intern/abstract_hierarchy_iterator.cc +++ b/source/blender/io/common/intern/abstract_hierarchy_iterator.cc @@ -267,6 +267,11 @@ void AbstractHierarchyIterator::export_graph_construct() { Scene *scene = DEG_get_evaluated_scene(depsgraph_); + /* Add a "null" root node with no children immediately for the case where the top-most node in + * the scene is not being exported and a root node otherwise wouldn't get added. */ + ExportGraph::key_type root_node_id = ObjectIdentifier::for_real_object(nullptr); + export_graph_[root_node_id] = ExportChildren(); + DEG_OBJECT_ITER_BEGIN (depsgraph_, object, DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY | |