Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-12-05 14:52:17 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-12-06 12:21:33 +0300
commit4a99cc5850bff6033080a27d81e73f3355af996a (patch)
tree9f9d3fc4a4e5d7a59414cb83aec7f56873eb8f55 /source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h
parent8b3aa8ef45ea5f6dff88706f274638ef9a43d71a (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_impl.h')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h15
1 files changed, 9 insertions, 6 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 38c0b205661..ba55a83b767 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h
@@ -42,14 +42,15 @@ 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)
+ 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);
+ add_operation_relation(op_from, op_to, description, check_unique);
}
else {
if (!op_from) {
@@ -76,13 +77,14 @@ void DepsgraphRelationBuilder::add_relation(const KeyFrom &key_from,
template <typename KeyTo>
void DepsgraphRelationBuilder::add_relation(const TimeSourceKey &key_from,
const KeyTo &key_to,
- const char *description)
+ 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);
+ add_time_relation(time_from, op_to, description, check_unique);
}
}
@@ -90,13 +92,14 @@ template <typename KeyType>
void DepsgraphRelationBuilder::add_node_handle_relation(
const KeyType &key_from,
const DepsNodeHandle *handle,
- const char *description)
+ const char *description,
+ bool check_unique)
{
DepsNode *node_from = get_node(key_from);
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);
+ add_operation_relation(op_from, op_to, description, check_unique);
}
else {
if (!op_from) {