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>2020-01-24 13:11:38 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2020-01-24 14:44:16 +0300
commitc89e103348414feb3396c7b10abb594c77d8c333 (patch)
tree4d997a1bd28bc677e3459de31447c9b4f6316fdd /source/blender/depsgraph/intern/depsgraph.cc
parent3401b070b8d06446449b67b3088dfbc8e507c9b8 (diff)
Depsgrapg: Refactor, move Relation to own file
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph.cc38
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. */