Blender
V2.93
source
blender
depsgraph
intern
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. */
35
enum
RelationFlag
{
36
/* "cyclic" link - when detecting cycles, this relationship was the one
37
* which triggers a cyclic relationship to exist in the graph. */
38
RELATION_FLAG_CYCLIC
= (1 << 0),
39
/* Update flush will not go through this relation. */
40
RELATION_FLAG_NO_FLUSH
= (1 << 1),
41
/* Only flush along the relation is update comes from a node which was
42
* affected by user input. */
43
RELATION_FLAG_FLUSH_USER_EDIT_ONLY
= (1 << 2),
44
/* The relation can not be killed by the cyclic dependencies solver. */
45
RELATION_FLAG_GODMODE
= (1 << 4),
46
/* Relation will check existence before being added. */
47
RELATION_CHECK_BEFORE_ADD
= (1 << 5),
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
65
MEM_CXX_CLASS_ALLOC_FUNCS
(
"Relation"
);
66
};
67
68
}
// namespace deg
69
}
// namespace blender
MEM_guardedalloc.h
Read Guarded memory(de)allocation.
blender::deg
Definition:
deg_builder.cc:53
blender::deg::RelationFlag
RelationFlag
Definition:
depsgraph_relation.h:35
blender::deg::RELATION_FLAG_NO_FLUSH
@ RELATION_FLAG_NO_FLUSH
Definition:
depsgraph_relation.h:40
blender::deg::RELATION_FLAG_FLUSH_USER_EDIT_ONLY
@ RELATION_FLAG_FLUSH_USER_EDIT_ONLY
Definition:
depsgraph_relation.h:43
blender::deg::RELATION_CHECK_BEFORE_ADD
@ RELATION_CHECK_BEFORE_ADD
Definition:
depsgraph_relation.h:47
blender::deg::RELATION_FLAG_GODMODE
@ RELATION_FLAG_GODMODE
Definition:
depsgraph_relation.h:45
blender::deg::RELATION_FLAG_CYCLIC
@ RELATION_FLAG_CYCLIC
Definition:
depsgraph_relation.h:38
blender
Definition:
BKE_attribute_access.hh:30
Node
Definition:
node.h:98
blender::deg::Node
Definition:
deg_node.h:148
blender::deg::Relation
Definition:
depsgraph_relation.h:51
blender::deg::Relation::~Relation
~Relation()
Definition:
depsgraph_relation.cc:53
blender::deg::Relation::to
Node * to
Definition:
depsgraph_relation.h:59
blender::deg::Relation::from
Node * from
Definition:
depsgraph_relation.h:58
blender::deg::Relation::MEM_CXX_CLASS_ALLOC_FUNCS
MEM_CXX_CLASS_ALLOC_FUNCS("Relation")
blender::deg::Relation::name
const char * name
Definition:
depsgraph_relation.h:62
blender::deg::Relation::flag
int flag
Definition:
depsgraph_relation.h:63
blender::deg::Relation::unlink
void unlink()
Definition:
depsgraph_relation.cc:59
blender::deg::Relation::Relation
Relation(Node *from, Node *to, const char *description)
Definition:
depsgraph_relation.cc:33
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1