diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-04-23 17:44:09 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-04-23 17:44:09 +0300 |
commit | fc9624e485e17fa43e21931b1e5f2b5ec5211ab2 (patch) | |
tree | 0d6604d8fe204d244e792b27c30fa46986216f0a /source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h | |
parent | c8e1f18c5d6342bca3cb78ad349dc2c1b16d3104 (diff) | |
parent | 53d69e6d048f918b2c9ee61d3e9f27db64fdfa52 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h b/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h index 485586e844f..894d4172c00 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h @@ -46,17 +46,17 @@ OperationDepsNode *DepsgraphRelationBuilder::find_operation_node(const KeyType& } template <typename KeyFrom, typename KeyTo> -void DepsgraphRelationBuilder::add_relation(const KeyFrom &key_from, - const KeyTo &key_to, - const char *description, - bool check_unique) +DepsRelation *DepsgraphRelationBuilder::add_relation(const KeyFrom &key_from, + const KeyTo &key_to, + const char *description, + bool check_unique) { DepsNode *node_from = get_node(key_from); DepsNode *node_to = get_node(key_to); OperationDepsNode *op_from = node_from ? node_from->get_exit_operation() : NULL; OperationDepsNode *op_to = node_to ? node_to->get_entry_operation() : NULL; if (op_from && op_to) { - add_operation_relation(op_from, op_to, description, check_unique); + return add_operation_relation(op_from, op_to, description, check_unique); } else { if (!op_from) { @@ -78,24 +78,27 @@ void DepsgraphRelationBuilder::add_relation(const KeyFrom &key_from, description, key_to.identifier().c_str()); } } + return NULL; } template <typename KeyTo> -void DepsgraphRelationBuilder::add_relation(const TimeSourceKey &key_from, - const KeyTo &key_to, - const char *description, - bool check_unique) +DepsRelation *DepsgraphRelationBuilder::add_relation( + const TimeSourceKey &key_from, + const KeyTo &key_to, + const char *description, + bool check_unique) { TimeSourceDepsNode *time_from = get_node(key_from); DepsNode *node_to = get_node(key_to); OperationDepsNode *op_to = node_to ? node_to->get_entry_operation() : NULL; if (time_from != NULL && op_to != NULL) { - add_time_relation(time_from, op_to, description, check_unique); + return add_time_relation(time_from, op_to, description, check_unique); } + return NULL; } template <typename KeyType> -void DepsgraphRelationBuilder::add_node_handle_relation( +DepsRelation *DepsgraphRelationBuilder::add_node_handle_relation( const KeyType &key_from, const DepsNodeHandle *handle, const char *description, @@ -105,7 +108,7 @@ void DepsgraphRelationBuilder::add_node_handle_relation( OperationDepsNode *op_from = node_from ? node_from->get_exit_operation() : NULL; OperationDepsNode *op_to = handle->node->get_entry_operation(); if (op_from != NULL && op_to != NULL) { - add_operation_relation(op_from, op_to, description, check_unique); + return add_operation_relation(op_from, op_to, description, check_unique); } else { if (!op_from) { @@ -117,6 +120,7 @@ void DepsgraphRelationBuilder::add_node_handle_relation( description, key_from.identifier().c_str()); } } + return NULL; } template <typename KeyType> |