diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-22 16:54:08 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-22 18:17:18 +0300 |
commit | a20d350dd50c731c880e5c8099f64396145d3d94 (patch) | |
tree | 5d4027207e6886f06c883e0d02830fbff05f8739 /source/blender/depsgraph/intern/depsgraph.cc | |
parent | 3d77517ad5b341bd3c589c349e38a62e433c8ec2 (diff) |
Depsgraph: Cleanup, make it easier to create relations with flags
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph.cc')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc index 7f47dce9f47..6dd7ae97073 100644 --- a/source/blender/depsgraph/intern/depsgraph.cc +++ b/source/blender/depsgraph/intern/depsgraph.cc @@ -393,34 +393,40 @@ void Depsgraph::clear_id_nodes() DepsRelation *Depsgraph::add_new_relation(OperationDepsNode *from, OperationDepsNode *to, const char *description, - bool check_unique) + bool check_unique, + int flags) { DepsRelation *rel = NULL; if (check_unique) { rel = check_nodes_connected(from, to, description); } if (rel != NULL) { + rel->flag |= flags; return rel; } /* Create new relation, and add it to the graph. */ rel = OBJECT_GUARDED_NEW(DepsRelation, from, to, description); + rel->flag |= flags; return rel; } /* Add new relation between two nodes */ DepsRelation *Depsgraph::add_new_relation(DepsNode *from, DepsNode *to, const char *description, - bool check_unique) + bool check_unique, + int flags) { DepsRelation *rel = NULL; if (check_unique) { rel = check_nodes_connected(from, to, description); } if (rel != NULL) { + rel->flag |= flags; return rel; } /* Create new relation, and add it to the graph. */ rel = OBJECT_GUARDED_NEW(DepsRelation, from, to, description); + rel->flag |= flags; return rel; } |