Blender  V3.3
depsgraph_relation.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2020 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #include "MEM_guardedalloc.h"
11 
12 namespace blender::deg {
13 
14 struct Node;
15 
16 /* Settings/Tags on Relationship.
17  * NOTE: Is a bitmask, allowing accumulation. */
19  /* "cyclic" link - when detecting cycles, this relationship was the one
20  * which triggers a cyclic relationship to exist in the graph. */
22  /* Update flush will not go through this relation. */
24  /* Only flush along the relation is update comes from a node which was
25  * affected by user input. */
27  /* The relation can not be killed by the cyclic dependencies solver. */
29  /* Relation will check existence before being added. */
31 };
32 
33 /* B depends on A (A -> B) */
34 struct Relation {
35  Relation(Node *from, Node *to, const char *description);
36  ~Relation();
37 
38  void unlink();
39 
40  /* the nodes in the relationship (since this is shared between the nodes) */
41  Node *from; /* A */
42  Node *to; /* B */
43 
44  /* relationship attributes */
45  const char *name; /* label for debugging */
46  int flag; /* Bitmask of RelationFlag) */
47 
49 };
50 
51 } // namespace blender::deg
Read Guarded memory(de)allocation.
@ RELATION_FLAG_FLUSH_USER_EDIT_ONLY
MEM_CXX_CLASS_ALLOC_FUNCS("Relation")
Relation(Node *from, Node *to, const char *description)