Blender
V2.93
source
blender
nodes
intern
node_exec.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) 2007 Blender Foundation.
17
* All rights reserved.
18
*/
19
24
#pragma once
25
26
#include "
DNA_listBase.h
"
27
28
#include "
BLI_utildefines.h
"
29
30
#include "
BKE_node.h
"
31
32
#include "
node_util.h
"
33
34
#include "
RNA_types.h
"
35
36
#ifdef __cplusplus
37
extern
"C"
{
38
#endif
39
40
struct
bNode
;
41
struct
bNodeStack
;
42
struct
bNodeTree
;
43
44
/* Node execution data */
45
typedef
struct
bNodeExec
{
47
struct
bNode
*
node
;
48
bNodeExecData
data
;
49
51
NodeFreeExecFunction
free_exec_fn
;
52
}
bNodeExec
;
53
54
/* Execution Data for each instance of node tree execution */
55
typedef
struct
bNodeTreeExec
{
56
struct
bNodeTree
*
nodetree
;
/* backpointer to node tree */
57
58
int
totnodes
;
/* total node count */
59
struct
bNodeExec
*
nodeexec
;
/* per-node execution data */
60
61
int
stacksize
;
62
struct
bNodeStack
*
stack
;
/* socket data stack */
63
/* only used by material and texture trees to keep one stack for each thread */
64
ListBase
*
threadstack
;
/* one instance of the stack for each thread */
65
}
bNodeTreeExec
;
66
67
/* stores one stack copy for each thread (material and texture trees) */
68
typedef
struct
bNodeThreadStack
{
69
struct
bNodeThreadStack
*
next
, *
prev
;
70
struct
bNodeStack
*
stack
;
71
bool
used
;
72
}
bNodeThreadStack
;
73
74
int
node_exec_socket_use_stack
(
struct
bNodeSocket
*sock);
75
76
struct
bNodeStack
*
node_get_socket_stack
(
struct
bNodeStack
*stack,
struct
bNodeSocket
*sock);
77
void
node_get_stack
(
struct
bNode
*
node
,
78
struct
bNodeStack
*stack,
79
struct
bNodeStack
**in,
80
struct
bNodeStack
**out);
81
82
struct
bNodeTreeExec
*
ntree_exec_begin
(
struct
bNodeExecContext
*
context
,
83
struct
bNodeTree
*
ntree
,
84
bNodeInstanceKey
parent_key);
85
void
ntree_exec_end
(
struct
bNodeTreeExec
*
exec
);
86
87
struct
bNodeThreadStack
*
ntreeGetThreadStack
(
struct
bNodeTreeExec
*
exec
,
int
thread
);
88
void
ntreeReleaseThreadStack
(
struct
bNodeThreadStack
*nts);
89
bool
ntreeExecThreadNodes
(
struct
bNodeTreeExec
*
exec
,
90
struct
bNodeThreadStack
*nts,
91
void
*callerdata,
92
int
thread
);
93
94
struct
bNodeTreeExec
*
ntreeShaderBeginExecTree_internal
(
struct
bNodeExecContext
*
context
,
95
struct
bNodeTree
*
ntree
,
96
bNodeInstanceKey
parent_key);
97
void
ntreeShaderEndExecTree_internal
(
struct
bNodeTreeExec
*
exec
);
98
99
struct
bNodeTreeExec
*
ntreeTexBeginExecTree_internal
(
struct
bNodeExecContext
*
context
,
100
struct
bNodeTree
*
ntree
,
101
bNodeInstanceKey
parent_key);
102
void
ntreeTexEndExecTree_internal
(
struct
bNodeTreeExec
*
exec
);
103
104
#ifdef __cplusplus
105
}
106
#endif
BKE_node.h
NodeFreeExecFunction
void(* NodeFreeExecFunction)(void *nodedata)
Definition:
BKE_node.h:202
BLI_utildefines.h
DNA_listBase.h
These structs are the foundation for all linked lists in the library system.
RNA_types.h
thread
Definition:
util_thread.h:47
node
OperationNode * node
Definition:
deg_builder_cycle.cc:54
ntree
bNodeTree * ntree
Definition:
eevee_shaders.c:170
ntreeShaderBeginExecTree_internal
struct bNodeTreeExec * ntreeShaderBeginExecTree_internal(struct bNodeExecContext *context, struct bNodeTree *ntree, bNodeInstanceKey parent_key)
Definition:
node_shader_tree.c:954
ntreeReleaseThreadStack
void ntreeReleaseThreadStack(struct bNodeThreadStack *nts)
Definition:
node_exec.cc:305
node_get_stack
void node_get_stack(struct bNode *node, struct bNodeStack *stack, struct bNodeStack **in, struct bNodeStack **out)
Definition:
node_exec.cc:53
ntreeShaderEndExecTree_internal
void ntreeShaderEndExecTree_internal(struct bNodeTreeExec *exec)
Definition:
node_shader_tree.c:1001
ntreeTexBeginExecTree_internal
struct bNodeTreeExec * ntreeTexBeginExecTree_internal(struct bNodeExecContext *context, struct bNodeTree *ntree, bNodeInstanceKey parent_key)
Definition:
node_texture_tree.c:180
node_get_socket_stack
struct bNodeStack * node_get_socket_stack(struct bNodeStack *stack, struct bNodeSocket *sock)
Definition:
node_exec.cc:45
ntreeGetThreadStack
struct bNodeThreadStack * ntreeGetThreadStack(struct bNodeTreeExec *exec, int thread)
Definition:
node_exec.cc:283
bNodeThreadStack
struct bNodeThreadStack bNodeThreadStack
ntreeTexEndExecTree_internal
void ntreeTexEndExecTree_internal(struct bNodeTreeExec *exec)
Definition:
node_texture_tree.c:242
bNodeExec
struct bNodeExec bNodeExec
ntree_exec_begin
struct bNodeTreeExec * ntree_exec_begin(struct bNodeExecContext *context, struct bNodeTree *ntree, bNodeInstanceKey parent_key)
Definition:
node_exec.cc:156
bNodeTreeExec
struct bNodeTreeExec bNodeTreeExec
ntreeExecThreadNodes
bool ntreeExecThreadNodes(struct bNodeTreeExec *exec, struct bNodeThreadStack *nts, void *callerdata, int thread)
Definition:
node_exec.cc:310
ntree_exec_end
void ntree_exec_end(struct bNodeTreeExec *exec)
Definition:
node_exec.cc:259
node_exec_socket_use_stack
int node_exec_socket_use_stack(struct bNodeSocket *sock)
Definition:
node_exec.cc:38
exec
static void exec(void *data, int UNUSED(thread), bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out)
Definition:
node_texture_at.c:47
node_util.h
context
struct SELECTID_Context context
Definition:
select_engine.c:47
ListBase
Definition:
DNA_listBase.h:46
bNodeExecContext
Definition:
node_util.h:48
bNodeExecData
Definition:
node_util.h:52
bNodeExec
Definition:
node_exec.h:45
bNodeExec::data
bNodeExecData data
Definition:
node_exec.h:48
bNodeExec::free_exec_fn
NodeFreeExecFunction free_exec_fn
Definition:
node_exec.h:51
bNodeExec::node
struct bNode * node
Definition:
node_exec.h:47
bNodeInstanceKey
Definition:
DNA_node_types.h:366
bNodeSocket
Definition:
DNA_node_types.h:82
bNodeStack
Definition:
DNA_node_types.h:51
bNodeThreadStack
Definition:
node_exec.h:68
bNodeThreadStack::prev
struct bNodeThreadStack * prev
Definition:
node_exec.h:69
bNodeThreadStack::next
struct bNodeThreadStack * next
Definition:
node_exec.h:69
bNodeThreadStack::used
bool used
Definition:
node_exec.h:71
bNodeThreadStack::stack
struct bNodeStack * stack
Definition:
node_exec.h:70
bNodeTreeExec
Definition:
node_exec.h:55
bNodeTreeExec::totnodes
int totnodes
Definition:
node_exec.h:58
bNodeTreeExec::stacksize
int stacksize
Definition:
node_exec.h:61
bNodeTreeExec::nodeexec
struct bNodeExec * nodeexec
Definition:
node_exec.h:59
bNodeTreeExec::stack
struct bNodeStack * stack
Definition:
node_exec.h:62
bNodeTreeExec::nodetree
struct bNodeTree * nodetree
Definition:
node_exec.h:56
bNodeTreeExec::threadstack
ListBase * threadstack
Definition:
node_exec.h:64
bNodeTree
Definition:
DNA_node_types.h:426
bNode
Definition:
DNA_node_types.h:212
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1