diff options
author | Hans Goudey <h.goudey@me.com> | 2020-08-12 21:19:05 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-08-12 21:19:05 +0300 |
commit | 31705201dddebf7e3be5c4533b89f380aad1ede1 (patch) | |
tree | 53c8be86b15e9ebd96dd60cad52e6acac8ce2324 /source/blender/io/common/IO_abstract_hierarchy_iterator.h | |
parent | ea4c327c977223922c41c889fa2bd51403409dca (diff) | |
parent | 337b6d075880ea44ff5183804a387dc98673ffb9 (diff) |
Merge branch 'master' into active-fcurve-keyframe
Diffstat (limited to 'source/blender/io/common/IO_abstract_hierarchy_iterator.h')
-rw-r--r-- | source/blender/io/common/IO_abstract_hierarchy_iterator.h | 14 |
1 files changed, 9 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 2669f137fd4..d0d9d72b880 100644 --- a/source/blender/io/common/IO_abstract_hierarchy_iterator.h +++ b/source/blender/io/common/IO_abstract_hierarchy_iterator.h @@ -33,8 +33,7 @@ * Selections like "selected only" or "no hair systems" are left to concrete subclasses. */ -#ifndef __ABSTRACT_HIERARCHY_ITERATOR_H__ -#define __ABSTRACT_HIERARCHY_ITERATOR_H__ +#pragma once #include "IO_dupli_persistent_id.hh" @@ -129,7 +128,14 @@ class AbstractHierarchyWriter { // but wasn't used while exporting the current frame (for example, a particle-instanced mesh of // which the particle is no longer alive). protected: + /* Return true if the data written by this writer changes over time. + * Note that this function assumes this is an object data writer. Transform writers should not + * call this but implement their own logic. */ virtual bool check_is_animated(const HierarchyContext &context) const; + + /* Helper functions for animation checks. */ + static bool check_has_physics(const HierarchyContext &context); + static bool check_has_deforming_physics(const HierarchyContext &context); }; /* Determines which subset of the writers actually gets to write. */ @@ -340,7 +346,7 @@ class AbstractHierarchyIterator { virtual AbstractHierarchyWriter *create_particle_writer(const HierarchyContext *context) = 0; /* Called by release_writers() to free what the create_XXX_writer() functions allocated. */ - virtual void delete_object_writer(AbstractHierarchyWriter *writer) = 0; + virtual void release_writer(AbstractHierarchyWriter *writer) = 0; AbstractHierarchyWriter *get_writer(const std::string &export_path) const; ExportChildren &graph_children(const HierarchyContext *parent_context); @@ -348,5 +354,3 @@ class AbstractHierarchyIterator { } // namespace io } // namespace blender - -#endif /* __ABSTRACT_HIERARCHY_ITERATOR_H__ */ |