Blender  V2.93
depsgraph_relation.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2020 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 #include "MEM_guardedalloc.h"
27 
28 namespace blender {
29 namespace deg {
30 
31 struct Node;
32 
33 /* Settings/Tags on Relationship.
34  * NOTE: Is a bitmask, allowing accumulation. */
36  /* "cyclic" link - when detecting cycles, this relationship was the one
37  * which triggers a cyclic relationship to exist in the graph. */
39  /* Update flush will not go through this relation. */
41  /* Only flush along the relation is update comes from a node which was
42  * affected by user input. */
44  /* The relation can not be killed by the cyclic dependencies solver. */
46  /* Relation will check existence before being added. */
48 };
49 
50 /* B depends on A (A -> B) */
51 struct Relation {
52  Relation(Node *from, Node *to, const char *description);
53  ~Relation();
54 
55  void unlink();
56 
57  /* the nodes in the relationship (since this is shared between the nodes) */
58  Node *from; /* A */
59  Node *to; /* B */
60 
61  /* relationship attributes */
62  const char *name; /* label for debugging */
63  int flag; /* Bitmask of RelationFlag) */
64 
66 };
67 
68 } // namespace deg
69 } // namespace blender
Read Guarded memory(de)allocation.
@ RELATION_FLAG_FLUSH_USER_EDIT_ONLY
Definition: node.h:98
MEM_CXX_CLASS_ALLOC_FUNCS("Relation")
Relation(Node *from, Node *to, const char *description)