diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-04-23 17:42:37 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-04-23 17:42:37 +0300 |
commit | 53d69e6d048f918b2c9ee61d3e9f27db64fdfa52 (patch) | |
tree | bca3d93b8266df10f90019cbf7b070e547c8bd03 /source/blender/depsgraph/intern/builder/deg_builder_relations.h | |
parent | 0ca7a78f20db6f34bf158f671fc5bbc32ee5702c (diff) |
Depsgraph: Add relation flag to avoid flush across it
This way we can avoid re-evaluation of certain parts of datablock
when something unrelated has changed.
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_relations.h')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.h | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.h b/source/blender/depsgraph/intern/builder/deg_builder_relations.h index d1ca0b6c7dd..4a8e91f18db 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h @@ -80,6 +80,7 @@ namespace DEG { struct Depsgraph; struct DepsNode; struct DepsNodeHandle; +struct DepsRelation; struct RootDepsNode; struct IDDepsNode; struct TimeSourceDepsNode; @@ -173,22 +174,22 @@ struct DepsgraphRelationBuilder void begin_build(); template <typename KeyFrom, typename KeyTo> - void add_relation(const KeyFrom& key_from, - const KeyTo& key_to, - const char *description, - bool check_unique = false); + DepsRelation *add_relation(const KeyFrom& key_from, + const KeyTo& key_to, + const char *description, + bool check_unique = false); template <typename KeyTo> - void add_relation(const TimeSourceKey& key_from, - const KeyTo& key_to, - const char *description, - bool check_unique = false); + DepsRelation *add_relation(const TimeSourceKey& key_from, + const KeyTo& key_to, + const char *description, + bool check_unique = false); template <typename KeyType> - void add_node_handle_relation(const KeyType& key_from, - const DepsNodeHandle *handle, - const char *description, - bool check_unique = false); + DepsRelation *add_node_handle_relation(const KeyType& key_from, + const DepsNodeHandle *handle, + const char *description, + bool check_unique = false); void build_scene(Scene *scene); void build_group(Object *object, Group *group); @@ -274,14 +275,14 @@ protected: OperationDepsNode *find_node(const OperationKey &key) const; bool has_node(const OperationKey &key) const; - void add_time_relation(TimeSourceDepsNode *timesrc, - DepsNode *node_to, - const char *description, - bool check_unique = false); - void add_operation_relation(OperationDepsNode *node_from, - OperationDepsNode *node_to, - const char *description, - bool check_unique = false); + DepsRelation *add_time_relation(TimeSourceDepsNode *timesrc, + DepsNode *node_to, + const char *description, + bool check_unique = false); + DepsRelation *add_operation_relation(OperationDepsNode *node_from, + OperationDepsNode *node_to, + const char *description, + bool check_unique = false); template <typename KeyType> DepsNodeHandle create_node_handle(const KeyType& key, |