From 4a99cc5850bff6033080a27d81e73f3355af996a Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 5 Dec 2017 12:52:17 +0100 Subject: 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. --- .../depsgraph/intern/builder/deg_builder_relations.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'source/blender/depsgraph/intern/builder/deg_builder_relations.h') 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 void add_relation(const KeyFrom& key_from, const KeyTo& key_to, - const char *description); + const char *description, + bool check_unique = false); template void add_relation(const TimeSourceKey& key_from, const KeyTo& key_to, - const char *description); + const char *description, + bool check_unique = false); template 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 DepsNodeHandle create_node_handle(const KeyType& key, -- cgit v1.2.3