diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-12-05 14:52:17 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-12-06 12:21:33 +0300 |
commit | 4a99cc5850bff6033080a27d81e73f3355af996a (patch) | |
tree | 9f9d3fc4a4e5d7a59414cb83aec7f56873eb8f55 /source/blender/depsgraph/intern/builder/deg_builder_relations.h | |
parent | 8b3aa8ef45ea5f6dff88706f274638ef9a43d71a (diff) |
Depsgraph: Add ability to check whether relation exists before adding it
Currently not used, but this is aimed to be used when adding relations from
FCurve to property which is being animated.
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_relations.h')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.h b/source/blender/depsgraph/intern/builder/deg_builder_relations.h index b06d491a9aa..99256dc017c 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h @@ -174,17 +174,20 @@ struct DepsgraphRelationBuilder template <typename KeyFrom, typename KeyTo> void add_relation(const KeyFrom& key_from, const KeyTo& key_to, - const char *description); + const char *description, + bool check_unique = false); template <typename KeyTo> void add_relation(const TimeSourceKey& key_from, const KeyTo& key_to, - const char *description); + 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); + const char *description, + bool check_unique = false); void build_scene(Scene *scene); void build_group(Object *object, Group *group); @@ -261,10 +264,12 @@ protected: void add_time_relation(TimeSourceDepsNode *timesrc, DepsNode *node_to, - const char *description); + const char *description, + bool check_unique = false); void add_operation_relation(OperationDepsNode *node_from, OperationDepsNode *node_to, - const char *description); + const char *description, + bool check_unique = false); template <typename KeyType> DepsNodeHandle create_node_handle(const KeyType& key, |