Blender
V5.0
source
blender
depsgraph
intern
depsgraph_relation.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2020 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9
#pragma once
10
11
namespace
blender::deg
{
12
13
struct
Node
;
14
15
/* Settings/Tags on Relationship.
16
* NOTE: Is a bitmask, allowing accumulation. */
17
enum
RelationFlag
{
18
/* "cyclic" link - when detecting cycles, this relationship was the one
19
* which triggers a cyclic relationship to exist in the graph. */
20
RELATION_FLAG_CYCLIC
= (1 << 0),
21
/* Update flush will not go through this relation. */
22
RELATION_FLAG_NO_FLUSH
= (1 << 1),
23
/* Only flush along the relation is update comes from a node which was
24
* affected by user input. */
25
RELATION_FLAG_FLUSH_USER_EDIT_ONLY
= (1 << 2),
26
/* The relation can not be killed by the cyclic dependencies solver. */
27
RELATION_FLAG_GODMODE
= (1 << 4),
28
/* Relation will check existence before being added. */
29
RELATION_CHECK_BEFORE_ADD
= (1 << 5),
30
/* The relation does not participate in visibility checks. */
31
RELATION_NO_VISIBILITY_CHANGE
= (1 << 6),
32
};
33
34
/* B depends on A (A -> B) */
35
struct
Relation
{
36
Relation
(
Node
*
from
,
Node
*
to
,
const
char
*description) :
from
(
from
),
to
(
to
),
name
(description)
37
{
38
}
39
40
void
unlink
();
41
42
/* the nodes in the relationship (since this is shared between the nodes) */
43
Node
*
from
;
/* A */
44
Node
*
to
;
/* B */
45
46
/* relationship attributes */
47
const
char
*
name
;
/* label for debugging */
48
int
flag
= 0;
/* Bitmask of RelationFlag) */
49
};
50
51
}
// namespace blender::deg
blender::deg
Definition
DEG_depsgraph_light_linking.hh:14
blender::deg::RelationFlag
RelationFlag
Definition
depsgraph_relation.hh:17
blender::deg::RELATION_FLAG_NO_FLUSH
@ RELATION_FLAG_NO_FLUSH
Definition
depsgraph_relation.hh:22
blender::deg::RELATION_FLAG_FLUSH_USER_EDIT_ONLY
@ RELATION_FLAG_FLUSH_USER_EDIT_ONLY
Definition
depsgraph_relation.hh:25
blender::deg::RELATION_CHECK_BEFORE_ADD
@ RELATION_CHECK_BEFORE_ADD
Definition
depsgraph_relation.hh:29
blender::deg::RELATION_FLAG_GODMODE
@ RELATION_FLAG_GODMODE
Definition
depsgraph_relation.hh:27
blender::deg::RELATION_NO_VISIBILITY_CHANGE
@ RELATION_NO_VISIBILITY_CHANGE
Definition
depsgraph_relation.hh:31
blender::deg::RELATION_FLAG_CYCLIC
@ RELATION_FLAG_CYCLIC
Definition
depsgraph_relation.hh:20
blender::deg::Node
Definition
deg_node.hh:155
blender::deg::Relation::to
Node * to
Definition
depsgraph_relation.hh:44
blender::deg::Relation::from
Node * from
Definition
depsgraph_relation.hh:43
blender::deg::Relation::name
const char * name
Definition
depsgraph_relation.hh:47
blender::deg::Relation::flag
int flag
Definition
depsgraph_relation.hh:48
blender::deg::Relation::unlink
void unlink()
Definition
depsgraph_relation.cc:15
blender::deg::Relation::Relation
Relation(Node *from, Node *to, const char *description)
Definition
depsgraph_relation.hh:36
Generated on
for Blender by
doxygen
1.16.1