diff options
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph.cc')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph.cc | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc index 190ff4e929f..0e929f4e8b6 100644 --- a/source/blender/depsgraph/intern/depsgraph.cc +++ b/source/blender/depsgraph/intern/depsgraph.cc @@ -46,6 +46,7 @@ extern "C" { #include "intern/depsgraph_update.h" #include "intern/depsgraph_physics.h" +#include "intern/depsgraph_relation.h" #include "intern/depsgraph_registry.h" #include "intern/eval/deg_eval_copy_on_write.h" @@ -220,43 +221,6 @@ Relation *Depsgraph::check_nodes_connected(const Node *from, return NULL; } -/* ************************ */ -/* Relationships Management */ - -Relation::Relation(Node *from, Node *to, const char *description) - : from(from), to(to), name(description), flag(0) -{ - /* Hook it up to the nodes which use it. - * - * NOTE: We register relation in the nodes which this link connects to here - * in constructor but we don't unregister it in the destructor. - * - * Reasoning: - * - * - Destructor is currently used on global graph destruction, so there's no - * real need in avoiding dangling pointers, all the memory is to be freed - * anyway. - * - * - Unregistering relation is not a cheap operation, so better to have it - * as an explicit call if we need this. */ - from->outlinks.push_back(this); - to->inlinks.push_back(this); -} - -Relation::~Relation() -{ - /* Sanity check. */ - BLI_assert(from != NULL && to != NULL); -} - -void Relation::unlink() -{ - /* Sanity check. */ - BLI_assert(from != NULL && to != NULL); - remove_from_vector(&from->outlinks, this); - remove_from_vector(&to->inlinks, this); -} - /* Low level tagging -------------------------------------- */ /* Tag a specific node as needing updates. */ |