Blender
V3.3
source
blender
depsgraph
intern
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. */
18
enum
RelationFlag
{
19
/* "cyclic" link - when detecting cycles, this relationship was the one
20
* which triggers a cyclic relationship to exist in the graph. */
21
RELATION_FLAG_CYCLIC
= (1 << 0),
22
/* Update flush will not go through this relation. */
23
RELATION_FLAG_NO_FLUSH
= (1 << 1),
24
/* Only flush along the relation is update comes from a node which was
25
* affected by user input. */
26
RELATION_FLAG_FLUSH_USER_EDIT_ONLY
= (1 << 2),
27
/* The relation can not be killed by the cyclic dependencies solver. */
28
RELATION_FLAG_GODMODE
= (1 << 4),
29
/* Relation will check existence before being added. */
30
RELATION_CHECK_BEFORE_ADD
= (1 << 5),
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
48
MEM_CXX_CLASS_ALLOC_FUNCS
(
"Relation"
);
49
};
50
51
}
// namespace blender::deg
MEM_guardedalloc.h
Read Guarded memory(de)allocation.
blender::deg
Definition:
deg_builder.cc:40
blender::deg::RelationFlag
RelationFlag
Definition:
depsgraph_relation.h:18
blender::deg::RELATION_FLAG_NO_FLUSH
@ RELATION_FLAG_NO_FLUSH
Definition:
depsgraph_relation.h:23
blender::deg::RELATION_FLAG_FLUSH_USER_EDIT_ONLY
@ RELATION_FLAG_FLUSH_USER_EDIT_ONLY
Definition:
depsgraph_relation.h:26
blender::deg::RELATION_CHECK_BEFORE_ADD
@ RELATION_CHECK_BEFORE_ADD
Definition:
depsgraph_relation.h:30
blender::deg::RELATION_FLAG_GODMODE
@ RELATION_FLAG_GODMODE
Definition:
depsgraph_relation.h:28
blender::deg::RELATION_FLAG_CYCLIC
@ RELATION_FLAG_CYCLIC
Definition:
depsgraph_relation.h:21
Node
Definition:
graph/node.h:89
blender::deg::Node
Definition:
deg_node.h:146
blender::deg::Relation
Definition:
depsgraph_relation.h:34
blender::deg::Relation::~Relation
~Relation()
Definition:
depsgraph_relation.cc:37
blender::deg::Relation::to
Node * to
Definition:
depsgraph_relation.h:42
blender::deg::Relation::from
Node * from
Definition:
depsgraph_relation.h:41
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:45
blender::deg::Relation::flag
int flag
Definition:
depsgraph_relation.h:46
blender::deg::Relation::unlink
void unlink()
Definition:
depsgraph_relation.cc:43
blender::deg::Relation::Relation
Relation(Node *from, Node *to, const char *description)
Definition:
depsgraph_relation.cc:17
Generated on Sat Jul 27 2024 14:57:55 for Blender by
doxygen
1.9.1