Blender V4.3
BKE_node.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
10
11#include "BLI_compiler_compat.h"
12#include "BLI_ghash.h"
14#include "BLI_span.hh"
15
16#include "DNA_listBase.h"
17
18#include "BKE_volume_enums.hh"
19
20/* for FOREACH_NODETREE_BEGIN */
21#include "DNA_node_types.h"
22
23#include "RNA_types.hh"
24
25#include "BLI_map.hh"
26#include "BLI_string_ref.hh"
27
28/* not very important, but the stack solver likes to know a maximum */
29#define MAX_SOCKET 512
30
31struct BlendDataReader;
32struct BlendWriter;
34struct GPUMaterial;
35struct GPUNodeStack;
36struct ID;
37struct ImBuf;
39struct Light;
40struct Main;
41struct Material;
42struct PointerRNA;
43struct Scene;
44struct SpaceNode;
45struct Tex;
46struct World;
47struct bContext;
48struct bNode;
49struct bNodeExecContext;
50struct bNodeTreeExec;
51struct bNodeExecData;
52struct bNodeInstanceHash;
53struct bNodeLink;
54struct bNodeSocket;
55struct bNodeStack;
56struct bNodeTree;
57struct bNodeTreeExec;
58struct bNodeTreeType;
59struct uiLayout;
60
61namespace blender {
62class CPPType;
63namespace nodes {
64class DNode;
67class NodeDeclaration;
69class GatherAddNodeSearchParams;
72namespace value_elem {
74class ElemEvalParams;
75} // namespace value_elem
76namespace inverse_eval {
78} // namespace inverse_eval
79} // namespace nodes
81class Context;
82class NodeOperation;
83class ShaderNode;
84} // namespace realtime_compositor
85} // namespace blender
86
87namespace blender::bke {
88
89/* -------------------------------------------------------------------- */
92
104 int type;
105 char name[64]; /* MAX_NAME */
106 float val1, val2, val3, val4; /* default alloc value for inputs */
107 float min, max;
108 int subtype; /* would use PropertySubType but this is a bad level include to use RNA */
109 int flag;
110
111 /* after this line is used internal only */
112 bNodeSocket *sock; /* used to hold verified socket */
113 char identifier[64]; /* generated from name */
114};
115
116/* Use `void *` for callbacks that require C++. This is rather ugly, but works well for now. This
117 * would not be necessary if we would use bNodeSocketType and bNodeType only in C++ code.
118 * However, achieving this requires quite a few changes currently. */
123 const bNode &node,
125using SocketGetCPPValueFunction = void (*)(const void *socket_value, void *r_value);
126using SocketGetGeometryNodesCPPValueFunction = void (*)(const void *socket_value, void *r_value);
127
128/* Adds socket link operations that are specific to this node type. */
131
132/* Adds node add menu operations that are specific to this node type. */
134 void (*)(blender::nodes::GatherAddNodeSearchParams &params);
135
145
153 char idname[64];
155 char label[64];
158
159 void (*draw)(
160 bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr, const char *text);
161 void (*draw_color)(bContext *C, PointerRNA *ptr, PointerRNA *node_ptr, float *r_color);
162 void (*draw_color_simple)(const bNodeSocketType *socket_type, float *r_color);
163
166 const bNodeTreeInterfaceSocket *interface_socket,
167 bNode *node,
168 bNodeSocket *socket,
169 const char *data_path);
171 bNodeTreeInterfaceSocket *interface_socket,
172 const bNode *node,
173 const bNodeSocket *socket);
174
175 /* RNA integration */
178
179 /* for standard socket types in C */
181
182 /* When set, bNodeSocket->limit does not have any effect anymore. */
186
187 /* Callback to free the socket type. */
188 void (*free_self)(bNodeSocketType *stype);
189
190 /* Return the CPPType of this socket. */
192 /* Get the value of this socket in a generic way. */
194 /* Get geometry nodes cpp type. */
196 /* Get geometry nodes cpp value. */
198 /* Default value for this socket type. */
200};
201
202using NodeInitExecFunction = void *(*)(bNodeExecContext *context,
203 bNode *node,
204 bNodeInstanceKey key);
205using NodeFreeExecFunction = void (*)(void *nodedata);
206using NodeExecFunction = void (*)(
207 void *data, int thread, bNode *, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out);
209 GPUMaterial *mat, bNode *node, bNodeExecData *execdata, GPUNodeStack *in, GPUNodeStack *out);
210using NodeMaterialXFunction = void (*)(void *data, bNode *node, bNodeSocket *out);
211
218struct bNodeType {
219 char idname[64]; /* identifier name */
220 int type;
221
222 char ui_name[64]; /* MAX_NAME */
223 char ui_description[256];
226 const char *enum_name_legacy;
227
230 short nclass, flag;
231
232 /* templates for static sockets */
234
235 char storagename[64]; /* struct name for DNA */
236
237 /* Draw the option buttons on the node */
239 /* Additional parameters in the side panel */
241
242 /* Additional drawing on backdrop */
243 void (*draw_backdrop)(SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y);
244
249 void (*labelfunc)(const bNodeTree *ntree, const bNode *node, char *label, int label_maxncpy);
250
252 int (*ui_class)(const bNode *node);
254 std::string (*ui_description_fn)(const bNode &node);
255
257 void (*updatefunc)(bNodeTree *ntree, bNode *node);
259 void (*group_update_func)(bNodeTree *ntree, bNode *node);
260
267 void (*initfunc)(bNodeTree *ntree, bNode *node);
275 void (*freefunc)(bNode *node);
277 void (*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node);
278
279 /* Registerable API callback versions, called in addition to C callbacks */
282 void (*copyfunc_api)(PointerRNA *ptr, const bNode *src_node);
283
288 bool (*add_ui_poll)(const bContext *C);
289
299 bool (*poll)(const bNodeType *ntype, const bNodeTree *nodetree, const char **r_disabled_hint);
304 bool (*poll_instance)(const bNode *node,
305 const bNodeTree *nodetree,
306 const char **r_disabled_hint);
307
308 /* Optional handling of link insertion. Returns false if the link shouldn't be created. */
309 bool (*insert_link)(bNodeTree *ntree, bNode *node, bNodeLink *link);
310
311 void (*free_self)(bNodeType *ntype);
312
313 /* **** execution callbacks **** */
317 /* gpu */
319 /* MaterialX */
321
322 /* Get an instance of this node's compositor operation. Freeing the instance is the
323 * responsibility of the caller. */
325
326 /* Get an instance of this node's compositor shader node. Freeing the instance is the
327 * responsibility of the caller. */
329
330 /* A message to display in the node header for unsupported realtime compositor nodes. The message
331 * is assumed to be static and thus require no memory handling. This field is to be removed when
332 * all nodes are supported. */
334
335 /* Build a multi-function for this node. */
337
338 /* Execute a geometry node. */
340
348
357
364
367
373
379
386
393
398
399 /* RNA integration */
401};
402
404#define NODE_CLASS_INPUT 0
405#define NODE_CLASS_OUTPUT 1
406#define NODE_CLASS_OP_COLOR 3
407#define NODE_CLASS_OP_VECTOR 4
408#define NODE_CLASS_OP_FILTER 5
409#define NODE_CLASS_GROUP 6
410#define NODE_CLASS_CONVERTER 8
411#define NODE_CLASS_MATTE 9
412#define NODE_CLASS_DISTORT 10
413#define NODE_CLASS_PATTERN 12
414#define NODE_CLASS_TEXTURE 13
415#define NODE_CLASS_SCRIPT 32
416#define NODE_CLASS_INTERFACE 33
417#define NODE_CLASS_SHADER 40
418#define NODE_CLASS_GEOMETRY 41
419#define NODE_CLASS_ATTRIBUTE 42
420#define NODE_CLASS_LAYOUT 100
421
445
446using bNodeClassCallback = void (*)(void *calldata, int nclass, const char *name);
447
449 int type; /* type identifier */
450 char idname[64]; /* identifier name */
451
452 /* The ID name of group nodes for this type. */
453 char group_idname[64];
454
455 char ui_name[64];
456 char ui_description[256];
458
459 /* callbacks */
460 /* Iteration over all node classes. */
461 void (*foreach_nodeclass)(void *calldata, bNodeClassCallback func);
462 /* Check visibility in the node editor */
463 bool (*poll)(const bContext *C, bNodeTreeType *ntreetype);
464 /* Select a node tree from the context */
466 const bContext *C, bNodeTreeType *ntreetype, bNodeTree **r_ntree, ID **r_id, ID **r_from);
467
468 /* calls allowing threaded composite */
469 void (*localize)(bNodeTree *localtree, bNodeTree *ntree);
470 void (*local_merge)(Main *bmain, bNodeTree *localtree, bNodeTree *ntree);
471
472 /* Tree update. Overrides `nodetype->updatetreefunc`. */
473 void (*update)(bNodeTree *ntree);
474
476
477 void (*node_add_init)(bNodeTree *ntree, bNode *bnode);
478
479 /* Check if the socket type is valid for this tree type. */
480 bool (*valid_socket_type)(bNodeTreeType *ntreetype, bNodeSocketType *socket_type);
481
482 /* RNA integration */
484};
485
487
488/* -------------------------------------------------------------------- */
491
492bNodeTreeType *node_tree_type_find(const char *idname);
495bool node_tree_is_registered(const bNodeTree *ntree);
497
498/* Helper macros for iterating over tree types. */
499#define NODE_TREE_TYPES_BEGIN(ntype) \
500 { \
501 GHashIterator *__node_tree_type_iter__ = blender::bke::node_tree_type_get_iterator(); \
502 for (; !BLI_ghashIterator_done(__node_tree_type_iter__); \
503 BLI_ghashIterator_step(__node_tree_type_iter__)) \
504 { \
505 blender::bke::bNodeTreeType *ntype = (blender::bke::bNodeTreeType *) \
506 BLI_ghashIterator_getValue(__node_tree_type_iter__);
507
508#define NODE_TREE_TYPES_END \
509 } \
510 BLI_ghashIterator_free(__node_tree_type_iter__); \
511 } \
512 (void)0
513
522void node_tree_set_type(const bContext *C, bNodeTree *ntree);
523
524bNodeTree *node_tree_add_tree(Main *bmain, const char *name, const char *idname);
525
531 Library *owner_library,
532 const char *name,
533 const char *idname);
534
539
547
552
554
558bool node_tree_contains_tree(const bNodeTree *tree_to_search_in,
559 const bNodeTree *tree_to_search_for);
560
562
569
576bNodeTree *node_tree_localize(bNodeTree *ntree, ID *new_owner_id);
577
581void node_tree_blend_write(BlendWriter *writer, bNodeTree *ntree);
582
584
585/* -------------------------------------------------------------------- */
588
589bNodeType *node_type_find(const char *idname);
590const char *node_type_find_alias(const char *idname);
591void node_register_type(bNodeType *ntype);
592void node_unregister_type(bNodeType *ntype);
593void node_register_alias(bNodeType *nt, const char *alias);
595
596/* Helper macros for iterating over node types. */
597#define NODE_TYPES_BEGIN(ntype) \
598 { \
599 GHashIterator *__node_type_iter__ = blender::bke::node_type_get_iterator(); \
600 for (; !BLI_ghashIterator_done(__node_type_iter__); \
601 BLI_ghashIterator_step(__node_type_iter__)) { \
602 blender::bke::bNodeType *ntype = (blender::bke::bNodeType *)BLI_ghashIterator_getValue( \
603 __node_type_iter__);
604
605#define NODE_TYPES_END \
606 } \
607 BLI_ghashIterator_free(__node_type_iter__); \
608 } \
609 ((void)0)
610
611bNodeSocketType *node_socket_type_find(const char *idname);
612void node_register_socket_type(bNodeSocketType *stype);
613void node_unregister_socket_type(bNodeSocketType *stype);
614bool node_socket_is_registered(const bNodeSocket *sock);
616const char *node_socket_type_label(const bNodeSocketType *stype);
617
618const char *node_static_socket_type(int type, int subtype);
619const char *node_static_socket_interface_type_new(int type, int subtype);
620const char *node_static_socket_label(int type, int subtype);
621
622/* Helper macros for iterating over node types. */
623#define NODE_SOCKET_TYPES_BEGIN(stype) \
624 { \
625 GHashIterator *__node_socket_type_iter__ = blender::bke::node_socket_type_get_iterator(); \
626 for (; !BLI_ghashIterator_done(__node_socket_type_iter__); \
627 BLI_ghashIterator_step(__node_socket_type_iter__)) \
628 { \
629 blender::bke::bNodeSocketType *stype = (blender::bke::bNodeSocketType *) \
630 BLI_ghashIterator_getValue(__node_socket_type_iter__);
631
632#define NODE_SOCKET_TYPES_END \
633 } \
634 BLI_ghashIterator_free(__node_socket_type_iter__); \
635 } \
636 ((void)0)
637
639const bNodeSocket *node_find_socket(const bNode *node,
640 eNodeSocketInOut in_out,
641 StringRef identifier);
643 bNode *node,
644 eNodeSocketInOut in_out,
645 const char *idname,
646 const char *identifier,
647 const char *name);
649 bNode *node,
650 eNodeSocketInOut in_out,
651 int type,
652 int subtype,
653 const char *identifier,
654 const char *name);
655void node_remove_socket(bNodeTree *ntree, bNode *node, bNodeSocket *sock);
656
658 bNodeTree *ntree, bNode *node, bNodeSocket *sock, int type, int subtype);
659
660bNode *node_add_node(const bContext *C, bNodeTree *ntree, const char *idname);
661bNode *node_add_static_node(const bContext *C, bNodeTree *ntree, int type);
662
666void node_unique_name(bNodeTree *ntree, bNode *node);
671void node_unique_id(bNodeTree *ntree, bNode *node);
672
676void node_remove_node(Main *bmain, bNodeTree *ntree, bNode *node, bool do_id_user);
677
678void node_dimensions_get(const bNode *node, float *r_width, float *r_height);
679void node_tag_update_id(bNode *node);
680void node_internal_links(bNode *node, bNodeLink **r_links, int *r_len);
681
686 bNodeTree *ntree, bNode *fromnode, bNodeSocket *fromsock, bNode *tonode, bNodeSocket *tosock);
687void node_remove_link(bNodeTree *ntree, bNodeLink *link);
689
690bool node_link_is_hidden(const bNodeLink *link);
691
692void node_attach_node(bNodeTree *ntree, bNode *node, bNode *parent);
693void node_detach_node(bNodeTree *ntree, bNode *node);
694
698bool node_find_node_try(bNodeTree *ntree, bNodeSocket *sock, bNode **r_node, int *r_sockindex);
699
703void node_find_node(bNodeTree *ntree, bNodeSocket *sock, bNode **r_node, int *r_sockindex);
707bNode *node_find_node_by_name(bNodeTree *ntree, const char *name);
708
709bool node_is_parent_and_child(const bNode *parent, const bNode *child);
710
711int node_count_socket_links(const bNodeTree *ntree, const bNodeSocket *sock);
712
717bool node_set_selected(bNode *node, bool select);
721void node_set_active(bNodeTree *ntree, bNode *node);
723void node_clear_active(bNodeTree *ntree);
728
729int node_socket_link_limit(const bNodeSocket *sock);
730
738
739using bNodeInstanceValueFP = void (*)(void *value);
740
746
748 const bNodeTree *ntree,
749 const bNode *node);
750
757 bNodeInstanceValueFP valfreefp);
762
767
769
770/* -------------------------------------------------------------------- */
773
774bool node_group_poll(const bNodeTree *nodetree,
775 const bNodeTree *grouptree,
776 const char **r_disabled_hint);
777
779 bNodeType *ntype, const char *idname, const char *name, const char *enum_name, short nclass);
780
785void node_type_storage(bNodeType *ntype,
786 const char *storagename,
787 void (*freefunc)(bNode *node),
788 void (*copyfunc)(bNodeTree *dest_ntree,
789 bNode *dest_node,
790 const bNode *src_node));
791
793
794/* -------------------------------------------------------------------- */
797
798#define NODE_UNDEFINED -2 /* node type is not registered */
799#define NODE_CUSTOM -1 /* for dynamically registered custom types */
800#define NODE_GROUP 2
801// #define NODE_FORLOOP 3 /* deprecated */
802// #define NODE_WHILELOOP 4 /* deprecated */
803#define NODE_FRAME 5
804#define NODE_REROUTE 6
805#define NODE_GROUP_INPUT 7
806#define NODE_GROUP_OUTPUT 8
807#define NODE_CUSTOM_GROUP 9
808
810
811/* -------------------------------------------------------------------- */
846
847/* should be an opaque type, only for internal use by BKE_node_tree_iter_*** */
856};
857
858void node_tree_iterator_init(NodeTreeIterStore *ntreeiter, Main *bmain);
859bool node_tree_iterator_step(NodeTreeIterStore *ntreeiter, bNodeTree **r_nodetree, ID **r_id);
861#define FOREACH_NODETREE_BEGIN(bmain, _nodetree, _id) \
862 { \
863 blender::bke::NodeTreeIterStore _nstore; \
864 bNodeTree *_nodetree; \
865 ID *_id; \
866 /* avoid compiler warning about unused variables */ \
867 blender::bke::node_tree_iterator_init(&_nstore, bmain); \
868 while (blender::bke::node_tree_iterator_step(&_nstore, &_nodetree, &_id) == true) { \
869 if (_nodetree) {
871#define FOREACH_NODETREE_END \
872 } \
873 } \
874 } \
875 ((void)0)
876
878
879/* -------------------------------------------------------------------- */
882
883void node_tree_remove_layer_n(bNodeTree *ntree, Scene *scene, int layer_index);
884
885/* -------------------------------------------------------------------- */
888
889/* NOTE: types are needed to restore callbacks, don't change values. */
890
891// #define SH_NODE_MATERIAL 100
892#define SH_NODE_RGB 101
893#define SH_NODE_VALUE 102
894#define SH_NODE_MIX_RGB_LEGACY 103
895#define SH_NODE_VALTORGB 104
896#define SH_NODE_RGBTOBW 105
897#define SH_NODE_SHADERTORGB 106
898// #define SH_NODE_TEXTURE 106
899#define SH_NODE_NORMAL 107
900// #define SH_NODE_GEOMETRY 108
901#define SH_NODE_MAPPING 109
902#define SH_NODE_CURVE_VEC 110
903#define SH_NODE_CURVE_RGB 111
904#define SH_NODE_CAMERA 114
905#define SH_NODE_MATH 115
906#define SH_NODE_VECTOR_MATH 116
907#define SH_NODE_SQUEEZE 117
908// #define SH_NODE_MATERIAL_EXT 118
909#define SH_NODE_INVERT 119
910#define SH_NODE_SEPRGB_LEGACY 120
911#define SH_NODE_COMBRGB_LEGACY 121
912#define SH_NODE_HUE_SAT 122
914#define SH_NODE_OUTPUT_MATERIAL 124
915#define SH_NODE_OUTPUT_WORLD 125
916#define SH_NODE_OUTPUT_LIGHT 126
917#define SH_NODE_FRESNEL 127
918#define SH_NODE_MIX_SHADER 128
919#define SH_NODE_ATTRIBUTE 129
920#define SH_NODE_BACKGROUND 130
921#define SH_NODE_BSDF_GLOSSY 131
922#define SH_NODE_BSDF_DIFFUSE 132
923#define SH_NODE_BSDF_GLOSSY_LEGACY 133
924#define SH_NODE_BSDF_GLASS 134
925#define SH_NODE_BSDF_TRANSLUCENT 137
926#define SH_NODE_BSDF_TRANSPARENT 138
927#define SH_NODE_BSDF_SHEEN 139
928#define SH_NODE_EMISSION 140
929#define SH_NODE_NEW_GEOMETRY 141
930#define SH_NODE_LIGHT_PATH 142
931#define SH_NODE_TEX_IMAGE 143
932#define SH_NODE_TEX_SKY 145
933#define SH_NODE_TEX_GRADIENT 146
934#define SH_NODE_TEX_VORONOI 147
935#define SH_NODE_TEX_MAGIC 148
936#define SH_NODE_TEX_WAVE 149
937#define SH_NODE_TEX_NOISE 150
938#define SH_NODE_TEX_MUSGRAVE_DEPRECATED 152
939#define SH_NODE_TEX_COORD 155
940#define SH_NODE_ADD_SHADER 156
941#define SH_NODE_TEX_ENVIRONMENT 157
942// #define SH_NODE_OUTPUT_TEXTURE 158
943#define SH_NODE_HOLDOUT 159
944#define SH_NODE_LAYER_WEIGHT 160
945#define SH_NODE_VOLUME_ABSORPTION 161
946#define SH_NODE_VOLUME_SCATTER 162
947#define SH_NODE_GAMMA 163
948#define SH_NODE_TEX_CHECKER 164
949#define SH_NODE_BRIGHTCONTRAST 165
950#define SH_NODE_LIGHT_FALLOFF 166
951#define SH_NODE_OBJECT_INFO 167
952#define SH_NODE_PARTICLE_INFO 168
953#define SH_NODE_TEX_BRICK 169
954#define SH_NODE_BUMP 170
955#define SH_NODE_SCRIPT 171
956#define SH_NODE_AMBIENT_OCCLUSION 172
957#define SH_NODE_BSDF_REFRACTION 173
958#define SH_NODE_TANGENT 174
959#define SH_NODE_NORMAL_MAP 175
960#define SH_NODE_HAIR_INFO 176
961#define SH_NODE_SUBSURFACE_SCATTERING 177
962#define SH_NODE_WIREFRAME 178
963#define SH_NODE_BSDF_TOON 179
964#define SH_NODE_WAVELENGTH 180
965#define SH_NODE_BLACKBODY 181
966#define SH_NODE_VECT_TRANSFORM 182
967#define SH_NODE_SEPHSV_LEGACY 183
968#define SH_NODE_COMBHSV_LEGACY 184
969#define SH_NODE_BSDF_HAIR 185
970// #define SH_NODE_LAMP 186
971#define SH_NODE_UVMAP 187
972#define SH_NODE_SEPXYZ 188
973#define SH_NODE_COMBXYZ 189
974#define SH_NODE_OUTPUT_LINESTYLE 190
975#define SH_NODE_UVALONGSTROKE 191
976#define SH_NODE_TEX_POINTDENSITY 192
977#define SH_NODE_BSDF_PRINCIPLED 193
978#define SH_NODE_TEX_IES 194
979#define SH_NODE_EEVEE_SPECULAR 195
980#define SH_NODE_BEVEL 197
981#define SH_NODE_DISPLACEMENT 198
982#define SH_NODE_VECTOR_DISPLACEMENT 199
983#define SH_NODE_VOLUME_PRINCIPLED 200
984/* 201..700 occupied by other node types, continue from 701 */
985#define SH_NODE_BSDF_HAIR_PRINCIPLED 701
986#define SH_NODE_MAP_RANGE 702
987#define SH_NODE_CLAMP 703
988#define SH_NODE_TEX_WHITE_NOISE 704
989#define SH_NODE_VOLUME_INFO 705
990#define SH_NODE_VERTEX_COLOR 706
991#define SH_NODE_OUTPUT_AOV 707
992#define SH_NODE_VECTOR_ROTATE 708
993#define SH_NODE_CURVE_FLOAT 709
994#define SH_NODE_POINT_INFO 710
995#define SH_NODE_COMBINE_COLOR 711
996#define SH_NODE_SEPARATE_COLOR 712
997#define SH_NODE_MIX 713
998#define SH_NODE_BSDF_RAY_PORTAL 714
999#define SH_NODE_TEX_GABOR 715
1000#define SH_NODE_BSDF_METALLIC 716
1001
1003
1004/* -------------------------------------------------------------------- */
1007
1008/* output socket defines */
1009#define RRES_OUT_IMAGE 0
1010#define RRES_OUT_ALPHA 1
1011
1012/* NOTE: types are needed to restore callbacks, don't change values. */
1013#define CMP_NODE_VIEWER 201
1014#define CMP_NODE_RGB 202
1015#define CMP_NODE_VALUE 203
1016#define CMP_NODE_MIX_RGB 204
1017#define CMP_NODE_VALTORGB 205
1018#define CMP_NODE_RGBTOBW 206
1019#define CMP_NODE_NORMAL 207
1020#define CMP_NODE_CURVE_VEC 208
1021#define CMP_NODE_CURVE_RGB 209
1022#define CMP_NODE_ALPHAOVER 210
1023#define CMP_NODE_BLUR 211
1024#define CMP_NODE_FILTER 212
1025#define CMP_NODE_MAP_VALUE 213
1026#define CMP_NODE_TIME 214
1027#define CMP_NODE_VECBLUR 215
1028#define CMP_NODE_SEPRGBA_LEGACY 216
1029#define CMP_NODE_SEPHSVA_LEGACY 217
1030#define CMP_NODE_SETALPHA 218
1031#define CMP_NODE_HUE_SAT 219
1032#define CMP_NODE_IMAGE 220
1033#define CMP_NODE_R_LAYERS 221
1034#define CMP_NODE_COMPOSITE 222
1035#define CMP_NODE_OUTPUT_FILE 223
1036#define CMP_NODE_TEXTURE 224
1037#define CMP_NODE_TRANSLATE 225
1038#define CMP_NODE_ZCOMBINE 226
1039#define CMP_NODE_COMBRGBA_LEGACY 227
1040#define CMP_NODE_DILATEERODE 228
1041#define CMP_NODE_ROTATE 229
1042#define CMP_NODE_SCALE 230
1043#define CMP_NODE_SEPYCCA_LEGACY 231
1044#define CMP_NODE_COMBYCCA_LEGACY 232
1045#define CMP_NODE_SEPYUVA_LEGACY 233
1046#define CMP_NODE_COMBYUVA_LEGACY 234
1047#define CMP_NODE_DIFF_MATTE 235
1048#define CMP_NODE_COLOR_SPILL 236
1049#define CMP_NODE_CHROMA_MATTE 237
1050#define CMP_NODE_CHANNEL_MATTE 238
1051#define CMP_NODE_FLIP 239
1052/* Split viewer node is now a regular split node: CMP_NODE_SPLIT. */
1053#define CMP_NODE_SPLITVIEWER__DEPRECATED 240
1054// #define CMP_NODE_INDEX_MASK 241
1055#define CMP_NODE_MAP_UV 242
1056#define CMP_NODE_ID_MASK 243
1057#define CMP_NODE_DEFOCUS 244
1058#define CMP_NODE_DISPLACE 245
1059#define CMP_NODE_COMBHSVA_LEGACY 246
1060#define CMP_NODE_MATH 247
1061#define CMP_NODE_LUMA_MATTE 248
1062#define CMP_NODE_BRIGHTCONTRAST 249
1063#define CMP_NODE_GAMMA 250
1064#define CMP_NODE_INVERT 251
1065#define CMP_NODE_NORMALIZE 252
1066#define CMP_NODE_CROP 253
1067#define CMP_NODE_DBLUR 254
1068#define CMP_NODE_BILATERALBLUR 255
1069#define CMP_NODE_PREMULKEY 256
1070#define CMP_NODE_DIST_MATTE 257
1071#define CMP_NODE_VIEW_LEVELS 258
1072#define CMP_NODE_COLOR_MATTE 259
1073#define CMP_NODE_COLORBALANCE 260
1074#define CMP_NODE_HUECORRECT 261
1075#define CMP_NODE_MOVIECLIP 262
1076#define CMP_NODE_STABILIZE2D 263
1077#define CMP_NODE_TRANSFORM 264
1078#define CMP_NODE_MOVIEDISTORTION 265
1079#define CMP_NODE_DOUBLEEDGEMASK 266
1080#define CMP_NODE_OUTPUT_MULTI_FILE__DEPRECATED \
1081 267 /* DEPRECATED multi file node has been merged into regular CMP_NODE_OUTPUT_FILE */
1082#define CMP_NODE_MASK 268
1083#define CMP_NODE_KEYINGSCREEN 269
1084#define CMP_NODE_KEYING 270
1085#define CMP_NODE_TRACKPOS 271
1086#define CMP_NODE_INPAINT 272
1087#define CMP_NODE_DESPECKLE 273
1088#define CMP_NODE_ANTIALIASING 274
1089#define CMP_NODE_KUWAHARA 275
1090#define CMP_NODE_SPLIT 276
1092#define CMP_NODE_GLARE 301
1093#define CMP_NODE_TONEMAP 302
1094#define CMP_NODE_LENSDIST 303
1095#define CMP_NODE_SUNBEAMS 304
1097#define CMP_NODE_COLORCORRECTION 312
1098#define CMP_NODE_MASK_BOX 313
1099#define CMP_NODE_MASK_ELLIPSE 314
1100#define CMP_NODE_BOKEHIMAGE 315
1101#define CMP_NODE_BOKEHBLUR 316
1102#define CMP_NODE_SWITCH 317
1103#define CMP_NODE_PIXELATE 318
1105#define CMP_NODE_MAP_RANGE 319
1106#define CMP_NODE_PLANETRACKDEFORM 320
1107#define CMP_NODE_CORNERPIN 321
1108#define CMP_NODE_SWITCH_VIEW 322
1109#define CMP_NODE_CRYPTOMATTE_LEGACY 323
1110#define CMP_NODE_DENOISE 324
1111#define CMP_NODE_EXPOSURE 325
1112#define CMP_NODE_CRYPTOMATTE 326
1113#define CMP_NODE_POSTERIZE 327
1114#define CMP_NODE_CONVERT_COLOR_SPACE 328
1115#define CMP_NODE_SCENE_TIME 329
1116#define CMP_NODE_SEPARATE_XYZ 330
1117#define CMP_NODE_COMBINE_XYZ 331
1118#define CMP_NODE_COMBINE_COLOR 332
1119#define CMP_NODE_SEPARATE_COLOR 333
1120
1121/* channel toggles */
1122#define CMP_CHAN_RGB 1
1123#define CMP_CHAN_A 2
1124
1125/* Default SMAA configuration values. */
1126#define CMP_DEFAULT_SMAA_THRESHOLD 1.0f
1127#define CMP_DEFAULT_SMAA_CONTRAST_LIMIT 0.2f
1128#define CMP_DEFAULT_SMAA_CORNER_ROUNDING 0.25f
1129
1131
1132/* -------------------------------------------------------------------- */
1136#define TEX_NODE_OUTPUT 401
1137#define TEX_NODE_CHECKER 402
1138#define TEX_NODE_TEXTURE 403
1139#define TEX_NODE_BRICKS 404
1140#define TEX_NODE_MATH 405
1141#define TEX_NODE_MIX_RGB 406
1142#define TEX_NODE_RGBTOBW 407
1143#define TEX_NODE_VALTORGB 408
1144#define TEX_NODE_IMAGE 409
1145#define TEX_NODE_CURVE_RGB 410
1146#define TEX_NODE_INVERT 411
1147#define TEX_NODE_HUE_SAT 412
1148#define TEX_NODE_CURVE_TIME 413
1149#define TEX_NODE_ROTATE 414
1150#define TEX_NODE_VIEWER 415
1151#define TEX_NODE_TRANSLATE 416
1152#define TEX_NODE_COORD 417
1153#define TEX_NODE_DISTANCE 418
1154#define TEX_NODE_COMPOSE_LEGACY 419
1155#define TEX_NODE_DECOMPOSE_LEGACY 420
1156#define TEX_NODE_VALTONOR 421
1157#define TEX_NODE_SCALE 422
1158#define TEX_NODE_AT 423
1159#define TEX_NODE_COMBINE_COLOR 424
1160#define TEX_NODE_SEPARATE_COLOR 425
1161
1162/* 501-599 reserved. Use like this: TEX_NODE_PROC + TEX_CLOUDS, etc */
1163#define TEX_NODE_PROC 500
1164#define TEX_NODE_PROC_MAX 600
1165
1167
1168/* -------------------------------------------------------------------- */
1172#define GEO_NODE_TRIANGULATE 1000
1173#define GEO_NODE_TRANSFORM_GEOMETRY 1002
1174#define GEO_NODE_MESH_BOOLEAN 1003
1175#define GEO_NODE_OBJECT_INFO 1007
1176#define GEO_NODE_JOIN_GEOMETRY 1010
1177#define GEO_NODE_COLLECTION_INFO 1023
1178#define GEO_NODE_IS_VIEWPORT 1024
1179#define GEO_NODE_SUBDIVIDE_MESH 1029
1180#define GEO_NODE_MESH_PRIMITIVE_CUBE 1032
1181#define GEO_NODE_MESH_PRIMITIVE_CIRCLE 1033
1182#define GEO_NODE_MESH_PRIMITIVE_UV_SPHERE 1034
1183#define GEO_NODE_MESH_PRIMITIVE_CYLINDER 1035
1184#define GEO_NODE_MESH_PRIMITIVE_ICO_SPHERE 1036
1185#define GEO_NODE_MESH_PRIMITIVE_CONE 1037
1186#define GEO_NODE_MESH_PRIMITIVE_LINE 1038
1187#define GEO_NODE_MESH_PRIMITIVE_GRID 1039
1188#define GEO_NODE_BOUNDING_BOX 1042
1189#define GEO_NODE_SWITCH 1043
1190#define GEO_NODE_CURVE_TO_MESH 1045
1191#define GEO_NODE_RESAMPLE_CURVE 1047
1192#define GEO_NODE_INPUT_MATERIAL 1050
1193#define GEO_NODE_REPLACE_MATERIAL 1051
1194#define GEO_NODE_CURVE_LENGTH 1054
1195#define GEO_NODE_CONVEX_HULL 1056
1196#define GEO_NODE_SEPARATE_COMPONENTS 1059
1197#define GEO_NODE_CURVE_PRIMITIVE_STAR 1062
1198#define GEO_NODE_CURVE_PRIMITIVE_SPIRAL 1063
1199#define GEO_NODE_CURVE_PRIMITIVE_QUADRATIC_BEZIER 1064
1200#define GEO_NODE_CURVE_PRIMITIVE_BEZIER_SEGMENT 1065
1201#define GEO_NODE_CURVE_PRIMITIVE_CIRCLE 1066
1202#define GEO_NODE_VIEWER 1067
1203#define GEO_NODE_CURVE_PRIMITIVE_LINE 1068
1204#define GEO_NODE_CURVE_PRIMITIVE_QUADRILATERAL 1070
1205#define GEO_NODE_TRIM_CURVE 1071
1206#define GEO_NODE_FILL_CURVE 1075
1207#define GEO_NODE_INPUT_POSITION 1076
1208#define GEO_NODE_SET_POSITION 1077
1209#define GEO_NODE_INPUT_INDEX 1078
1210#define GEO_NODE_INPUT_NORMAL 1079
1211#define GEO_NODE_CAPTURE_ATTRIBUTE 1080
1212#define GEO_NODE_MATERIAL_SELECTION 1081
1213#define GEO_NODE_SET_MATERIAL 1082
1214#define GEO_NODE_REALIZE_INSTANCES 1083
1215#define GEO_NODE_ATTRIBUTE_STATISTIC 1084
1216#define GEO_NODE_SAMPLE_CURVE 1085
1217#define GEO_NODE_INPUT_TANGENT 1086
1218#define GEO_NODE_STRING_JOIN 1087
1219#define GEO_NODE_CURVE_SPLINE_PARAMETER 1088
1220#define GEO_NODE_FILLET_CURVE 1089
1221#define GEO_NODE_DISTRIBUTE_POINTS_ON_FACES 1090
1222#define GEO_NODE_STRING_TO_CURVES 1091
1223#define GEO_NODE_INSTANCE_ON_POINTS 1092
1224#define GEO_NODE_MESH_TO_POINTS 1093
1225#define GEO_NODE_POINTS_TO_VERTICES 1094
1226#define GEO_NODE_REVERSE_CURVE 1095
1227#define GEO_NODE_PROXIMITY 1096
1228#define GEO_NODE_SUBDIVIDE_CURVE 1097
1229#define GEO_NODE_INPUT_SPLINE_LENGTH 1098
1230#define GEO_NODE_CURVE_SPLINE_TYPE 1099
1231#define GEO_NODE_CURVE_SET_HANDLE_TYPE 1100
1232#define GEO_NODE_POINTS_TO_VOLUME 1101
1233#define GEO_NODE_CURVE_HANDLE_TYPE_SELECTION 1102
1234#define GEO_NODE_DELETE_GEOMETRY 1103
1235#define GEO_NODE_SEPARATE_GEOMETRY 1104
1236#define GEO_NODE_INPUT_RADIUS 1105
1237#define GEO_NODE_INPUT_CURVE_TILT 1106
1238#define GEO_NODE_INPUT_CURVE_HANDLES 1107
1239#define GEO_NODE_INPUT_FACE_SMOOTH 1108
1240#define GEO_NODE_INPUT_SPLINE_RESOLUTION 1109
1241#define GEO_NODE_INPUT_SPLINE_CYCLIC 1110
1242#define GEO_NODE_SET_CURVE_RADIUS 1111
1243#define GEO_NODE_SET_CURVE_TILT 1112
1244#define GEO_NODE_SET_CURVE_HANDLES 1113
1245#define GEO_NODE_SET_SHADE_SMOOTH 1114
1246#define GEO_NODE_SET_SPLINE_RESOLUTION 1115
1247#define GEO_NODE_SET_SPLINE_CYCLIC 1116
1248#define GEO_NODE_SET_POINT_RADIUS 1117
1249#define GEO_NODE_INPUT_MATERIAL_INDEX 1118
1250#define GEO_NODE_SET_MATERIAL_INDEX 1119
1251#define GEO_NODE_TRANSLATE_INSTANCES 1120
1252#define GEO_NODE_SCALE_INSTANCES 1121
1253#define GEO_NODE_ROTATE_INSTANCES 1122
1254#define GEO_NODE_SPLIT_EDGES 1123
1255#define GEO_NODE_MESH_TO_CURVE 1124
1256#define GEO_NODE_TRANSFER_ATTRIBUTE_DEPRECATED 1125
1257#define GEO_NODE_SUBDIVISION_SURFACE 1126
1258#define GEO_NODE_CURVE_ENDPOINT_SELECTION 1127
1259#define GEO_NODE_RAYCAST 1128
1260#define GEO_NODE_CURVE_TO_POINTS 1130
1261#define GEO_NODE_INSTANCES_TO_POINTS 1131
1262#define GEO_NODE_IMAGE_TEXTURE 1132
1263#define GEO_NODE_VOLUME_TO_MESH 1133
1264#define GEO_NODE_INPUT_ID 1134
1265#define GEO_NODE_SET_ID 1135
1266#define GEO_NODE_ATTRIBUTE_DOMAIN_SIZE 1136
1267#define GEO_NODE_DUAL_MESH 1137
1268#define GEO_NODE_INPUT_MESH_EDGE_VERTICES 1138
1269#define GEO_NODE_INPUT_MESH_FACE_AREA 1139
1270#define GEO_NODE_INPUT_MESH_FACE_NEIGHBORS 1140
1271#define GEO_NODE_INPUT_MESH_VERTEX_NEIGHBORS 1141
1272#define GEO_NODE_GEOMETRY_TO_INSTANCE 1142
1273#define GEO_NODE_INPUT_MESH_EDGE_NEIGHBORS 1143
1274#define GEO_NODE_INPUT_MESH_ISLAND 1144
1275#define GEO_NODE_INPUT_SCENE_TIME 1145
1276#define GEO_NODE_ACCUMULATE_FIELD 1146
1277#define GEO_NODE_INPUT_MESH_EDGE_ANGLE 1147
1278#define GEO_NODE_EVALUATE_AT_INDEX 1148
1279#define GEO_NODE_CURVE_PRIMITIVE_ARC 1149
1280#define GEO_NODE_FLIP_FACES 1150
1281#define GEO_NODE_SCALE_ELEMENTS 1151
1282#define GEO_NODE_EXTRUDE_MESH 1152
1283#define GEO_NODE_MERGE_BY_DISTANCE 1153
1284#define GEO_NODE_DUPLICATE_ELEMENTS 1154
1285#define GEO_NODE_INPUT_MESH_FACE_IS_PLANAR 1155
1286#define GEO_NODE_STORE_NAMED_ATTRIBUTE 1156
1287#define GEO_NODE_INPUT_NAMED_ATTRIBUTE 1157
1288#define GEO_NODE_REMOVE_ATTRIBUTE 1158
1289#define GEO_NODE_INPUT_INSTANCE_ROTATION 1159
1290#define GEO_NODE_INPUT_INSTANCE_SCALE 1160
1291#define GEO_NODE_VOLUME_CUBE 1161
1292#define GEO_NODE_POINTS 1162
1293#define GEO_NODE_EVALUATE_ON_DOMAIN 1163
1294#define GEO_NODE_MESH_TO_VOLUME 1164
1295#define GEO_NODE_UV_UNWRAP 1165
1296#define GEO_NODE_UV_PACK_ISLANDS 1166
1297#define GEO_NODE_DEFORM_CURVES_ON_SURFACE 1167
1298#define GEO_NODE_INPUT_SHORTEST_EDGE_PATHS 1168
1299#define GEO_NODE_EDGE_PATHS_TO_CURVES 1169
1300#define GEO_NODE_EDGE_PATHS_TO_SELECTION 1170
1301#define GEO_NODE_MESH_FACE_GROUP_BOUNDARIES 1171
1302#define GEO_NODE_DISTRIBUTE_POINTS_IN_VOLUME 1172
1303#define GEO_NODE_SELF_OBJECT 1173
1304#define GEO_NODE_SAMPLE_INDEX 1174
1305#define GEO_NODE_SAMPLE_NEAREST 1175
1306#define GEO_NODE_SAMPLE_NEAREST_SURFACE 1176
1307#define GEO_NODE_OFFSET_POINT_IN_CURVE 1177
1308#define GEO_NODE_CURVE_TOPOLOGY_CURVE_OF_POINT 1178
1309#define GEO_NODE_CURVE_TOPOLOGY_POINTS_OF_CURVE 1179
1310#define GEO_NODE_MESH_TOPOLOGY_OFFSET_CORNER_IN_FACE 1180
1311#define GEO_NODE_MESH_TOPOLOGY_CORNERS_OF_FACE 1181
1312#define GEO_NODE_MESH_TOPOLOGY_CORNERS_OF_VERTEX 1182
1313#define GEO_NODE_MESH_TOPOLOGY_EDGES_OF_CORNER 1183
1314#define GEO_NODE_MESH_TOPOLOGY_EDGES_OF_VERTEX 1184
1315#define GEO_NODE_MESH_TOPOLOGY_FACE_OF_CORNER 1185
1316#define GEO_NODE_MESH_TOPOLOGY_VERTEX_OF_CORNER 1186
1317#define GEO_NODE_SAMPLE_UV_SURFACE 1187
1318#define GEO_NODE_SET_CURVE_NORMAL 1188
1319#define GEO_NODE_IMAGE_INFO 1189
1320#define GEO_NODE_BLUR_ATTRIBUTE 1190
1321#define GEO_NODE_IMAGE 1191
1322#define GEO_NODE_INTERPOLATE_CURVES 1192
1323#define GEO_NODE_EDGES_TO_FACE_GROUPS 1193
1324// #define GEO_NODE_POINTS_TO_SDF_VOLUME 1194
1325// #define GEO_NODE_MESH_TO_SDF_VOLUME 1195
1326// #define GEO_NODE_SDF_VOLUME_SPHERE 1196
1327// #define GEO_NODE_MEAN_FILTER_SDF_VOLUME 1197
1328// #define GEO_NODE_OFFSET_SDF_VOLUME 1198
1329#define GEO_NODE_INDEX_OF_NEAREST 1199
1330/* Function nodes use the range starting at 1200. */
1331#define GEO_NODE_SIMULATION_INPUT 2100
1332#define GEO_NODE_SIMULATION_OUTPUT 2101
1333// #define GEO_NODE_INPUT_SIGNED_DISTANCE 2102
1334// #define GEO_NODE_SAMPLE_VOLUME 2103
1335#define GEO_NODE_MESH_TOPOLOGY_CORNERS_OF_EDGE 2104
1336/* Leaving out two indices to avoid crashes with files that were created during the development of
1337 * the repeat zone. */
1338#define GEO_NODE_REPEAT_INPUT 2107
1339#define GEO_NODE_REPEAT_OUTPUT 2108
1340#define GEO_NODE_TOOL_SELECTION 2109
1341#define GEO_NODE_TOOL_SET_SELECTION 2110
1342#define GEO_NODE_TOOL_3D_CURSOR 2111
1343#define GEO_NODE_TOOL_FACE_SET 2112
1344#define GEO_NODE_TOOL_SET_FACE_SET 2113
1345#define GEO_NODE_POINTS_TO_CURVES 2114
1346#define GEO_NODE_INPUT_EDGE_SMOOTH 2115
1347#define GEO_NODE_SPLIT_TO_INSTANCES 2116
1348#define GEO_NODE_INPUT_NAMED_LAYER_SELECTION 2117
1349#define GEO_NODE_INDEX_SWITCH 2118
1350#define GEO_NODE_INPUT_ACTIVE_CAMERA 2119
1351#define GEO_NODE_BAKE 2120
1352#define GEO_NODE_GET_NAMED_GRID 2121
1353#define GEO_NODE_STORE_NAMED_GRID 2122
1354#define GEO_NODE_SORT_ELEMENTS 2123
1355#define GEO_NODE_MENU_SWITCH 2124
1356#define GEO_NODE_SAMPLE_GRID 2125
1357#define GEO_NODE_MESH_TO_DENSITY_GRID 2126
1358#define GEO_NODE_MESH_TO_SDF_GRID 2127
1359#define GEO_NODE_POINTS_TO_SDF_GRID 2128
1360#define GEO_NODE_GRID_TO_MESH 2129
1361#define GEO_NODE_DISTRIBUTE_POINTS_IN_GRID 2130
1362#define GEO_NODE_SDF_GRID_BOOLEAN 2131
1363#define GEO_NODE_TOOL_VIEWPORT_TRANSFORM 2132
1364#define GEO_NODE_TOOL_MOUSE_POSITION 2133
1365#define GEO_NODE_SAMPLE_GRID_INDEX 2134
1366#define GEO_NODE_TOOL_ACTIVE_ELEMENT 2135
1367#define GEO_NODE_SET_INSTANCE_TRANSFORM 2136
1368#define GEO_NODE_INPUT_INSTANCE_TRANSFORM 2137
1369#define GEO_NODE_IMPORT_STL 2138
1370#define GEO_NODE_IMPORT_OBJ 2139
1371#define GEO_NODE_SET_GEOMETRY_NAME 2140
1372#define GEO_NODE_GIZMO_LINEAR 2141
1373#define GEO_NODE_GIZMO_DIAL 2142
1374#define GEO_NODE_GIZMO_TRANSFORM 2143
1375#define GEO_NODE_CURVES_TO_GREASE_PENCIL 2144
1376#define GEO_NODE_GREASE_PENCIL_TO_CURVES 2145
1377#define GEO_NODE_IMPORT_PLY 2146
1378#define GEO_NODE_WARNING 2147
1379#define GEO_NODE_FOREACH_GEOMETRY_ELEMENT_INPUT 2148
1380#define GEO_NODE_FOREACH_GEOMETRY_ELEMENT_OUTPUT 2149
1381#define GEO_NODE_MERGE_LAYERS 2150
1382
1384
1385/* -------------------------------------------------------------------- */
1389#define FN_NODE_BOOLEAN_MATH 1200
1390#define FN_NODE_COMPARE 1202
1391#define FN_NODE_LEGACY_RANDOM_FLOAT 1206
1392#define FN_NODE_INPUT_VECTOR 1207
1393#define FN_NODE_INPUT_STRING 1208
1394#define FN_NODE_FLOAT_TO_INT 1209
1395#define FN_NODE_VALUE_TO_STRING 1210
1396#define FN_NODE_STRING_LENGTH 1211
1397#define FN_NODE_SLICE_STRING 1212
1398#define FN_NODE_INPUT_SPECIAL_CHARACTERS 1213
1399#define FN_NODE_RANDOM_VALUE 1214
1400#define FN_NODE_ROTATE_EULER 1215
1401#define FN_NODE_ALIGN_EULER_TO_VECTOR 1216
1402#define FN_NODE_INPUT_COLOR 1217
1403#define FN_NODE_REPLACE_STRING 1218
1404#define FN_NODE_INPUT_BOOL 1219
1405#define FN_NODE_INPUT_INT 1220
1406#define FN_NODE_SEPARATE_COLOR 1221
1407#define FN_NODE_COMBINE_COLOR 1222
1408#define FN_NODE_AXIS_ANGLE_TO_ROTATION 1223
1409#define FN_NODE_EULER_TO_ROTATION 1224
1410#define FN_NODE_QUATERNION_TO_ROTATION 1225
1411#define FN_NODE_ROTATION_TO_AXIS_ANGLE 1226
1412#define FN_NODE_ROTATION_TO_EULER 1227
1413#define FN_NODE_ROTATION_TO_QUATERNION 1228
1414#define FN_NODE_ROTATE_VECTOR 1229
1415#define FN_NODE_ROTATE_ROTATION 1230
1416#define FN_NODE_INVERT_ROTATION 1231
1417#define FN_NODE_TRANSFORM_POINT 1232
1418#define FN_NODE_TRANSFORM_DIRECTION 1233
1419#define FN_NODE_MATRIX_MULTIPLY 1234
1420#define FN_NODE_COMBINE_TRANSFORM 1235
1421#define FN_NODE_SEPARATE_TRANSFORM 1236
1422#define FN_NODE_INVERT_MATRIX 1237
1423#define FN_NODE_TRANSPOSE_MATRIX 1238
1424#define FN_NODE_PROJECT_POINT 1239
1425#define FN_NODE_ALIGN_ROTATION_TO_VECTOR 1240
1426#define FN_NODE_COMBINE_MATRIX 1241
1427#define FN_NODE_SEPARATE_MATRIX 1242
1428#define FN_NODE_INPUT_ROTATION 1243
1429#define FN_NODE_AXES_TO_ROTATION 1244
1430#define FN_NODE_HASH_VALUE 1245
1431#define FN_NODE_INTEGER_MATH 1246
1432#define FN_NODE_MATRIX_DETERMINANT 1247
1433
1435
1436void node_system_init();
1437void node_system_exit();
1438
1440 ID *owner_id,
1441 const char *name,
1442 const char *idname);
1443
1444/* Copy/free functions, need to manage ID users. */
1445
1450void node_tree_free_tree(bNodeTree *ntree);
1451
1452bNodeTree *node_tree_copy_tree_ex(const bNodeTree *ntree, Main *bmain, bool do_id_user);
1453bNodeTree *node_tree_copy_tree(Main *bmain, const bNodeTree *ntree);
1454
1455void node_tree_free_local_node(bNodeTree *ntree, bNode *node);
1456
1458
1461
1462void node_tree_node_flag_set(const bNodeTree *ntree, int flag, bool enable);
1463
1469void node_tree_local_merge(Main *bmain, bNodeTree *localtree, bNodeTree *ntree);
1470
1474void node_tree_blend_read_data(BlendDataReader *reader, ID *owner_id, bNodeTree *ntree);
1475
1476bool node_type_is_undefined(const bNode *node);
1477
1478bool node_is_static_socket_type(const bNodeSocketType *stype);
1479
1480const char *node_socket_sub_type_label(int subtype);
1481
1482void node_remove_socket_ex(bNodeTree *ntree, bNode *node, bNodeSocket *sock, bool do_id_user);
1483
1484void node_modify_socket_type(bNodeTree *ntree, bNode *node, bNodeSocket *sock, const char *idname);
1485
1489void node_unlink_node(bNodeTree *ntree, bNode *node);
1490
1497
1505 const bNode &node_src,
1506 int flag,
1507 bool use_unique,
1509
1510bNode *node_copy(bNodeTree *dst_tree, const bNode &src_node, int flag, bool use_unique);
1511
1520 bNodeTree &tree,
1521 bNodeSocket &src,
1522 bNodeSocket &dst);
1523
1529void node_free_node(bNodeTree *tree, bNode *node);
1530
1538
1542void node_link_set_mute(bNodeTree *ntree, bNodeLink *link, const bool muted);
1543
1544bool node_link_is_selected(const bNodeLink *link);
1545
1546void node_internal_relink(bNodeTree *ntree, bNode *node);
1547
1548float2 node_to_view(const bNode *node, float2 loc);
1549
1550float2 node_from_view(const bNode *node, float2 view_loc);
1551
1552void node_position_relative(bNode *from_node,
1553 const bNode *to_node,
1554 const bNodeSocket *from_sock,
1555 const bNodeSocket *to_sock);
1556
1557void node_position_propagate(bNode *node);
1558
1563
1571void node_chain_iterator(const bNodeTree *ntree,
1572 const bNode *node_start,
1573 bool (*callback)(bNode *, bNode *, void *, const bool),
1574 void *userdata,
1575 bool reversed);
1576
1592 const bNode *node_start,
1593 bool (*callback)(bNode *, bNode *, void *),
1594 void *userdata,
1595 int recursion_lvl);
1596
1603void node_parents_iterator(bNode *node, bool (*callback)(bNode *, void *), void *userdata);
1604
1609bool node_is_dangling_reroute(const bNodeTree *ntree, const bNode *node);
1610
1612
1618bool node_supports_active_flag(const bNode *node, int sub_active);
1619
1620void node_set_socket_availability(bNodeTree *ntree, bNodeSocket *sock, bool is_available);
1621
1626bool node_declaration_ensure(bNodeTree *ntree, bNode *node);
1627
1633
1645}
1651}
1656}
1661}
1666}
1671}
1676}
1678#define NODE_INSTANCE_HASH_ITER(iter_, hash_) \
1679 for (blender::bke::node_instance_hash_iterator_init(&iter_, hash_); \
1680 blender::bke::node_instance_hash_iterator_done(&iter_) == false; \
1681 blender::bke::node_instance_hash_iterator_step(&iter_))
1682
1683/* Node Previews */
1684bool node_preview_used(const bNode *node);
1685
1687 bNodeInstanceHash *previews, bNodeInstanceKey key, int xsize, int ysize, bool create);
1688
1690
1691void node_preview_free(bNodePreview *preview);
1692
1693void node_preview_init_tree(bNodeTree *ntree, int xsize, int ysize);
1694
1696
1697void node_preview_merge_tree(bNodeTree *to_ntree, bNodeTree *from_ntree, bool remove_old);
1698
1699/* -------------------------------------------------------------------- */
1702
1703void nodeLabel(const bNodeTree *ntree, const bNode *node, char *label, int maxlen);
1704
1708const char *nodeSocketLabel(const bNodeSocket *sock);
1709
1714const char *nodeSocketShortLabel(const bNodeSocket *sock);
1715
1719void node_type_base(bNodeType *ntype, int type, const char *name, short nclass);
1720
1724
1725void node_type_size(bNodeType *ntype, int width, int minwidth, int maxwidth);
1732};
1733
1734void node_type_size_preset(bNodeType *ntype, eNodeSizePreset size);
1735
1736/* -------------------------------------------------------------------- */
1739
1740bool node_is_connected_to_output(const bNodeTree *ntree, const bNode *node);
1741
1743
1745
1747
1748extern bNodeTreeType NodeTreeTypeUndefined;
1749extern bNodeType NodeTypeUndefined;
1750extern bNodeSocketType NodeSocketTypeUndefined;
1751
1752std::optional<eCustomDataType> socket_type_to_custom_data_type(eNodeSocketDatatype type);
1753std::optional<eNodeSocketDatatype> custom_data_type_to_socket_type(eCustomDataType type);
1755std::optional<eNodeSocketDatatype> geo_nodes_base_cpp_type_to_socket_type(const CPPType &type);
1756std::optional<VolumeGridType> socket_type_to_grid_type(eNodeSocketDatatype type);
1757std::optional<eNodeSocketDatatype> grid_type_to_socket_type(VolumeGridType type);
1758
1764class bNodeZoneType {
1765 public:
1766 std::string input_idname;
1767 std::string output_idname;
1770 int theme_id;
1772 virtual ~bNodeZoneType() = default;
1774 virtual const int &get_corresponding_output_id(const bNode &input_bnode) const = 0;
1776 int &get_corresponding_output_id(bNode &input_bnode) const
1777 {
1778 return const_cast<int &>(
1779 this->get_corresponding_output_id(const_cast<const bNode &>(input_bnode)));
1780 }
1781
1782 const bNode *get_corresponding_input(const bNodeTree &tree, const bNode &output_bnode) const;
1783 bNode *get_corresponding_input(bNodeTree &tree, const bNode &output_bnode) const;
1784
1785 const bNode *get_corresponding_output(const bNodeTree &tree, const bNode &input_bnode) const;
1786 bNode *get_corresponding_output(bNodeTree &tree, const bNode &input_bnode) const;
1787};
1788
1789void register_node_zone_type(const bNodeZoneType &zone_type);
1790
1795const bNodeZoneType *zone_type_by_node_type(const int node_type);
1796
1797} // namespace blender::bke
1798
1799#define NODE_STORAGE_FUNCS(StorageT) \
1800 [[maybe_unused]] static StorageT &node_storage(bNode &node) \
1801 { \
1802 return *static_cast<StorageT *>(node.storage); \
1803 } \
1804 [[maybe_unused]] static const StorageT &node_storage(const bNode &node) \
1805 { \
1806 return *static_cast<const StorageT *>(node.storage); \
1807 }
1808
1809constexpr int NODE_DEFAULT_MAX_WIDTH = 700;
1810constexpr int GROUP_NODE_DEFAULT_WIDTH = 140;
1812constexpr int GROUP_NODE_MIN_WIDTH = 40;
constexpr int GROUP_NODE_MIN_WIDTH
Definition BKE_node.hh:1812
constexpr int GROUP_NODE_DEFAULT_WIDTH
Definition BKE_node.hh:1810
constexpr int GROUP_NODE_MAX_WIDTH
Definition BKE_node.hh:1811
constexpr int NODE_DEFAULT_MAX_WIDTH
Definition BKE_node.hh:1809
VolumeGridType
#define BLI_INLINE
BLI_INLINE void * BLI_ghashIterator_getKey(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
Definition BLI_ghash.h:299
void BLI_ghashIterator_step(GHashIterator *ghi)
Definition BLI_ghash.c:911
void BLI_ghashIterator_free(GHashIterator *ghi)
Definition BLI_ghash.c:925
BLI_INLINE void * BLI_ghashIterator_getValue(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
Definition BLI_ghash.h:303
GHashIterator * BLI_ghashIterator_new(GHash *gh) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
Definition BLI_ghash.c:888
void BLI_ghashIterator_init(GHashIterator *ghi, GHash *gh)
Definition BLI_ghash.c:895
BLI_INLINE bool BLI_ghashIterator_done(const GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
Definition BLI_ghash.h:311
These structs are the foundation for all linked lists in the library system.
eNodeSocketInOut
eNodeSocketDatatype
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Map
#define C
Definition RandGen.cpp:29
int main(int argc, char *argv[])
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition btDbvt.cpp:52
const bNode * get_corresponding_input(const bNodeTree &tree, const bNode &output_bnode) const
virtual const int & get_corresponding_output_id(const bNode &input_bnode) const =0
virtual ~bNodeZoneType()=default
const bNode * get_corresponding_output(const bNodeTree &tree, const bNode &input_bnode) const
KDTree_3d * tree
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
ccl_device_inline float4 select(const int4 mask, const float4 a, const float4 b)
bNode * node_get_active_texture(bNodeTree *ntree)
int node_instance_hash_haskey(bNodeInstanceHash *hash, bNodeInstanceKey key)
Definition node.cc:4112
void node_tree_set_output(bNodeTree *ntree)
Definition node.cc:3650
void(*)(const void *socket_value, void *r_value) SocketGetGeometryNodesCPPValueFunction
Definition BKE_node.hh:126
bNodeSocket * node_find_enabled_input_socket(bNode &node, StringRef name)
Definition node.cc:1863
void node_instance_hash_tag(bNodeInstanceHash *hash, void *value)
Definition node.cc:4134
bool node_is_parent_and_child(const bNode *parent, const bNode *child)
Definition node.cc:2491
bNodePreview * node_preview_copy(bNodePreview *preview)
Definition node.cc:3307
int node_instance_hash_size(bNodeInstanceHash *hash)
Definition node.cc:4117
bNodeTree * node_tree_copy_tree_ex(const bNodeTree *ntree, Main *bmain, bool do_id_user)
Definition node.cc:3247
void node_socket_declarations_update(bNode *node)
Definition node.cc:3958
void node_instance_hash_insert(bNodeInstanceHash *hash, bNodeInstanceKey key, void *value)
Definition node.cc:4082
void(*)(blender::nodes::GatherAddNodeSearchParams &params) NodeGatherAddOperationsFunction
Definition BKE_node.hh:133
const bNodeZoneType * zone_type_by_node_type(const int node_type)
void node_modify_socket_type_static(bNodeTree *ntree, bNode *node, bNodeSocket *sock, int type, int subtype)
Definition node.cc:2082
bNodeSocketType NodeSocketTypeUndefined
Definition node.cc:136
std::optional< eNodeSocketDatatype > geo_nodes_base_cpp_type_to_socket_type(const CPPType &type)
Definition node.cc:4471
void(*)(const void *socket_value, void *r_value) SocketGetCPPValueFunction
Definition BKE_node.hh:125
float2 node_to_view(const bNode *node, float2 loc)
Definition node.cc:3089
void node_tree_remove_layer_n(bNodeTree *ntree, Scene *scene, int layer_index)
Definition node.cc:4764
void node_attach_node(bNodeTree *ntree, bNode *node, bNode *parent)
Definition node.cc:3107
void node_unlink_node(bNodeTree *ntree, bNode *node)
Definition node.cc:3428
bool node_supports_active_flag(const bNode *node, int sub_active)
Does the given node supports the sub active flag.
void node_register_alias(bNodeType *nt, const char *alias)
Definition node.cc:1731
void node_tree_blend_read_data(BlendDataReader *reader, ID *owner_id, bNodeTree *ntree)
Definition node.cc:1042
bool node_type_is_undefined(const bNode *node)
Definition node.cc:1736
void node_set_active(bNodeTree *ntree, bNode *node)
Definition node.cc:3896
void node_detach_node(bNodeTree *ntree, bNode *node)
Definition node.cc:3122
blender::realtime_compositor::ShaderNode *(*)(blender::nodes::DNode node) NodeGetCompositorShaderNodeFunction
Definition BKE_node.hh:138
const char * node_type_find_alias(const char *idname)
Definition node.cc:1679
bool node_declaration_ensure_on_outdated_node(bNodeTree *ntree, bNode *node)
Definition node.cc:3970
void node_tree_free_local_tree(bNodeTree *ntree)
Definition node.cc:3639
bool node_socket_is_registered(const bNodeSocket *sock)
Definition node.cc:1801
bool node_link_is_hidden(const bNodeLink *link)
Definition node.cc:2993
int node_instance_hash_remove(bNodeInstanceHash *hash, bNodeInstanceKey key, bNodeInstanceValueFP valfreefp)
Definition node.cc:4095
void * node_instance_hash_lookup(bNodeInstanceHash *hash, bNodeInstanceKey key)
Definition node.cc:4090
const char * node_socket_sub_type_label(int subtype)
Definition node.cc:1820
void *(*)(bNodeExecContext *context, bNode *node, bNodeInstanceKey key) NodeInitExecFunction
Definition BKE_node.hh:202
BLI_INLINE bNodeInstanceHashIterator * node_instance_hash_iterator_new(bNodeInstanceHash *hash)
Definition BKE_node.hh:1641
void node_remove_socket_links(bNodeTree *ntree, bNodeSocket *sock)
Definition node.cc:2984
void node_unregister_socket_type(bNodeSocketType *stype)
Definition node.cc:1796
std::optional< VolumeGridType > socket_type_to_grid_type(eNodeSocketDatatype type)
Definition node.cc:4500
BLI_INLINE bool node_instance_hash_iterator_done(bNodeInstanceHashIterator *iter)
Definition BKE_node.hh:1672
bNodeTree * node_tree_copy_tree(Main *bmain, const bNodeTree *ntree)
Definition node.cc:3255
bNodeTree * node_tree_add_in_lib(Main *bmain, Library *owner_library, const char *name, const char *idname)
Definition node.cc:3231
bool node_tree_iterator_step(NodeTreeIterStore *ntreeiter, bNodeTree **r_nodetree, ID **r_id)
Definition node.cc:4719
bNodeTree * node_tree_localize(bNodeTree *ntree, ID *new_owner_id)
Definition node.cc:3750
void node_tree_blend_write(BlendWriter *writer, bNodeTree *ntree)
Definition node.cc:760
bNode * node_add_static_node(const bContext *C, bNodeTree *ntree, int type)
Definition node.cc:2642
void node_remove_node(Main *bmain, bNodeTree *ntree, bNode *node, bool do_id_user)
Definition node.cc:3545
void node_update_asset_metadata(bNodeTree &node_tree)
Definition node.cc:1305
bool node_preview_used(const bNode *node)
Definition node.cc:3267
void node_preview_free(bNodePreview *preview)
Definition node.cc:3314
bool node_is_connected_to_output(const bNodeTree *ntree, const bNode *node)
void(*)(blender::nodes::GeoNodeExecParams params) NodeGeometryExecFunction
Definition BKE_node.hh:120
bool node_group_poll(const bNodeTree *nodetree, const bNodeTree *grouptree, const char **r_disabled_hint)
void node_internal_relink(bNodeTree *ntree, bNode *node)
Definition node.cc:3019
GHashIterator * node_type_get_iterator()
Definition node.cc:1758
void node_position_relative(bNode *from_node, const bNode *to_node, const bNodeSocket *from_sock, const bNodeSocket *to_sock)
Definition node.cc:3136
bNode * node_get_active_paint_canvas(bNodeTree *ntree)
bNode * node_copy_with_mapping(bNodeTree *dst_tree, const bNode &node_src, int flag, bool use_unique, Map< const bNodeSocket *, bNodeSocket * > &new_socket_map)
Definition node.cc:2696
void node_tree_set_type(const bContext *C, bNodeTree *ntree)
Definition node.cc:1598
BLI_INLINE void node_instance_hash_iterator_step(bNodeInstanceHashIterator *iter)
Definition BKE_node.hh:1667
Span< int > all_zone_output_node_types()
void(*)(blender::nodes::NodeExtraInfoParams &params) NodeExtraInfoFunction
Definition BKE_node.hh:140
void node_link_set_mute(bNodeTree *ntree, bNodeLink *link, const bool muted)
Definition node.cc:2975
bNode * node_copy(bNodeTree *dst_tree, const bNode &src_node, int flag, bool use_unique)
Definition node.cc:2895
void node_tree_update_all_new(Main *main)
Definition node.cc:4215
bNodeLink * node_add_link(bNodeTree *ntree, bNode *fromnode, bNodeSocket *fromsock, bNode *tonode, bNodeSocket *tosock)
Definition node.cc:2912
void node_type_size_preset(bNodeType *ntype, eNodeSizePreset size)
Definition node.cc:4614
void nodeLabel(const bNodeTree *ntree, const bNode *node, char *label, int maxlen)
Definition node.cc:4267
bNodeSocket * node_add_static_socket(bNodeTree *ntree, bNode *node, eNodeSocketInOut in_out, int type, int subtype, const char *identifier, const char *name)
Definition node.cc:2359
bool node_find_node_try(bNodeTree *ntree, bNodeSocket *sock, bNode **r_node, int *r_sockindex)
Definition node.cc:2459
bNode * node_find_root_parent(bNode *node)
Definition node.cc:2479
void node_tree_node_flag_set(const bNodeTree *ntree, int flag, bool enable)
Definition node.cc:3738
blender::realtime_compositor::NodeOperation *(*)(blender::realtime_compositor::Context &context, blender::nodes::DNode node) NodeGetCompositorOperationFunction
Definition BKE_node.hh:136
void node_instance_hash_remove_untagged(bNodeInstanceHash *hash, bNodeInstanceValueFP valfreefp)
Definition node.cc:4153
void node_chain_iterator_backwards(const bNodeTree *ntree, const bNode *node_start, bool(*callback)(bNode *, bNode *, void *), void *userdata, int recursion_lvl)
Definition node.cc:2561
void node_chain_iterator(const bNodeTree *ntree, const bNode *node_start, bool(*callback)(bNode *, bNode *, void *, const bool), void *userdata, bool reversed)
Definition node.cc:2501
int(*)( GPUMaterial *mat, bNode *node, bNodeExecData *execdata, GPUNodeStack *in, GPUNodeStack *out) NodeGPUExecFunction
Definition BKE_node.hh:208
void node_tree_type_free_link(const bNodeTreeType *nt)
Definition node.cc:1652
void node_tree_local_merge(Main *bmain, bNodeTree *localtree, bNodeTree *ntree)
Definition node.cc:3793
bNodeTree * node_tree_add_tree(Main *bmain, const char *name, const char *idname)
Definition node.cc:3226
BLI_INLINE void * node_instance_hash_iterator_get_value(bNodeInstanceHashIterator *iter)
Definition BKE_node.hh:1662
bool node_instance_hash_tag_key(bNodeInstanceHash *hash, bNodeInstanceKey key)
Definition node.cc:4140
bNode * node_get_active(bNodeTree *ntree)
Definition node.cc:3849
bool node_is_static_socket_type(const bNodeSocketType *stype)
Definition node.cc:2117
GHashIterator bNodeInstanceHashIterator
Definition BKE_node.hh:1639
void(*)(blender::nodes::NodeDeclarationBuilder &builder) NodeDeclareFunction
Definition BKE_node.hh:121
void node_tree_iterator_init(NodeTreeIterStore *ntreeiter, Main *bmain)
Definition node.cc:4709
const char * nodeSocketShortLabel(const bNodeSocket *sock)
Definition node.cc:4285
void node_instance_hash_clear_tags(bNodeInstanceHash *hash)
Definition node.cc:4122
std::optional< eNodeSocketDatatype > grid_type_to_socket_type(VolumeGridType type)
Definition node.cc:4516
bNodeType * node_type_find(const char *idname)
Definition node.cc:1667
void node_node_foreach_id(bNode *node, LibraryForeachIDData *data)
Definition node.cc:378
bNodeTreeType NodeTreeTypeUndefined
Definition node.cc:134
void(*)(void *calldata, int nclass, const char *name) bNodeClassCallback
Definition BKE_node.hh:446
BLI_INLINE void node_instance_hash_iterator_init(bNodeInstanceHashIterator *iter, bNodeInstanceHash *hash)
Definition BKE_node.hh:1646
bNode * node_add_node(const bContext *C, bNodeTree *ntree, const char *idname)
Definition node.cc:2617
bNodeTree ** node_tree_ptr_from_id(ID *id)
Definition node.cc:3712
void node_parents_iterator(bNode *node, bool(*callback)(bNode *, void *), void *userdata)
Definition node.cc:2583
bool node_link_is_selected(const bNodeLink *link)
Definition node.cc:2998
bNodeSocketType * node_socket_type_find(const char *idname)
Definition node.cc:1763
void node_rebuild_id_vector(bNodeTree *node_tree)
Definition node.cc:3464
void node_position_propagate(bNode *node)
Definition node.cc:3178
const char * node_socket_type_label(const bNodeSocketType *stype)
Definition node.cc:1811
void(*)(void *data, bNode *node, bNodeSocket *out) NodeMaterialXFunction
Definition BKE_node.hh:210
void node_tree_type_add(bNodeTreeType *nt)
Definition node.cc:1633
const bNodeInstanceKey NODE_INSTANCE_KEY_BASE
Definition node.cc:4020
std::optional< eNodeSocketDatatype > custom_data_type_to_socket_type(eCustomDataType type)
Definition node.cc:4403
void node_system_exit()
Definition node.cc:4659
bNodeTree * node_tree_add_tree_embedded(Main *bmain, ID *owner_id, const char *name, const char *idname)
Definition node.cc:3239
void node_preview_remove_unused(bNodeTree *ntree)
Definition node.cc:3376
void node_instance_hash_clear(bNodeInstanceHash *hash, bNodeInstanceValueFP valfreefp)
Definition node.cc:4102
bool node_is_dangling_reroute(const bNodeTree *ntree, const bNode *node)
bNodeType NodeTypeUndefined
Definition node.cc:135
void node_type_socket_templates(bNodeType *ntype, bNodeSocketTemplate *inputs, bNodeSocketTemplate *outputs)
Definition node.cc:4570
bNodeInstanceKey node_instance_key(bNodeInstanceKey parent_key, const bNodeTree *ntree, const bNode *node)
Definition node.cc:4041
void node_remove_socket(bNodeTree *ntree, bNode *node, bNodeSocket *sock)
Definition node.cc:2405
void node_find_node(bNodeTree *ntree, bNodeSocket *sock, bNode **r_node, int *r_sockindex)
Definition node.cc:2442
void node_register_socket_type(bNodeSocketType *stype)
Definition node.cc:1787
void node_remove_link(bNodeTree *ntree, bNodeLink *link)
Definition node.cc:2958
const char * node_static_socket_type(int type, int subtype)
Definition node.cc:2126
void node_preview_merge_tree(bNodeTree *to_ntree, bNodeTree *from_ntree, bool remove_old)
Definition node.cc:3390
void node_tree_free_tree(bNodeTree *ntree)
Definition node.cc:3626
void node_set_socket_availability(bNodeTree *ntree, bNodeSocket *sock, bool is_available)
Definition node.cc:3911
void node_type_size(bNodeType *ntype, int width, int minwidth, int maxwidth)
Definition node.cc:4602
GHashIterator * node_tree_type_get_iterator()
Definition node.cc:1662
bNodeSocket * node_find_enabled_output_socket(bNode &node, StringRef name)
Definition node.cc:1868
bNodeSocket * node_add_socket(bNodeTree *ntree, bNode *node, eNodeSocketInOut in_out, const char *idname, const char *identifier, const char *name)
Definition node.cc:2095
const CPPType * socket_type_to_geo_nodes_base_cpp_type(eNodeSocketDatatype type)
Definition node.cc:4438
Span< const bNodeZoneType * > all_zone_types()
void(*)(blender::nodes::GatherLinkSearchOpParams &params) NodeGatherSocketLinkOperationsFunction
Definition BKE_node.hh:129
void node_type_storage(bNodeType *ntype, const char *storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
Definition node.cc:4632
void node_tree_free_local_node(bNodeTree *ntree, bNode *node)
Definition node.cc:3531
BLI_INLINE bNodeInstanceKey node_instance_hash_iterator_get_key(bNodeInstanceHashIterator *iter)
Definition BKE_node.hh:1657
bool node_set_selected(bNode *node, bool select)
Definition node.cc:3863
void node_preview_init_tree(bNodeTree *ntree, int xsize, int ysize)
Definition node.cc:3345
Span< int > all_zone_node_types()
void node_internal_links(bNode *node, bNodeLink **r_links, int *r_len)
Definition node.cc:4012
void node_clear_active(bNodeTree *ntree)
Definition node.cc:3885
void register_node_zone_type(const bNodeZoneType &zone_type)
bNodeSocket * node_find_enabled_socket(bNode &node, eNodeSocketInOut in_out, StringRef name)
Definition node.cc:1850
void(*)(const bNodeTree &tree, const bNode &node, blender::nodes::NodeDeclarationBuilder &builder) NodeDeclareDynamicFunction
Definition BKE_node.hh:122
const char * node_static_socket_label(int type, int subtype)
Definition node.cc:2318
Span< int > all_zone_input_node_types()
BLI_INLINE void node_instance_hash_iterator_free(bNodeInstanceHashIterator *iter)
Definition BKE_node.hh:1652
void node_unregister_type(bNodeType *ntype)
Definition node.cc:1726
void node_tag_update_id(bNode *node)
Definition node.cc:4007
void node_register_type(bNodeType *ntype)
Definition node.cc:1708
void(*)(blender::nodes::value_elem::ElemEvalParams &params) NodeElemEvalFunction
Definition BKE_node.hh:143
void * node_instance_hash_pop(bNodeInstanceHash *hash, bNodeInstanceKey key)
Definition node.cc:4107
bool node_tree_contains_tree(const bNodeTree *tree_to_search_in, const bNodeTree *tree_to_search_for)
Definition node.cc:3827
int node_socket_link_limit(const bNodeSocket *sock)
Definition node.cc:3925
void(*)(blender::nodes::inverse_eval::InverseEvalParams &params) NodeInverseEvalFunction
Definition BKE_node.hh:144
void node_instance_hash_free(bNodeInstanceHash *hash, bNodeInstanceValueFP valfreefp)
Definition node.cc:4076
void(*)(blender::nodes::NodeMultiFunctionBuilder &builder) NodeMultiFunctionBuildFunction
Definition BKE_node.hh:119
const char * nodeSocketLabel(const bNodeSocket *sock)
Definition node.cc:4296
void(*)( void *data, int thread, bNode *, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out) NodeExecFunction
Definition BKE_node.hh:206
bNodePreview * node_preview_verify(bNodeInstanceHash *previews, bNodeInstanceKey key, int xsize, int ysize, bool create)
Definition node.cc:3273
void(*)(void *value) bNodeInstanceValueFP
Definition BKE_node.hh:739
GHashIterator * node_socket_type_get_iterator()
Definition node.cc:1806
bool node_declaration_ensure(bNodeTree *ntree, bNode *node)
Definition node.cc:3992
bNodeTreeType * node_tree_type_find(const char *idname)
Definition node.cc:1621
void node_unique_id(bNodeTree *ntree, bNode *node)
Definition node.cc:2599
void node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
int node_count_socket_links(const bNodeTree *ntree, const bNodeSocket *sock)
Definition node.cc:3838
void(*)(void *nodedata) NodeFreeExecFunction
Definition BKE_node.hh:205
void node_free_node(bNodeTree *tree, bNode *node)
Definition node.cc:3475
void node_type_base_custom(bNodeType *ntype, const char *idname, const char *name, const char *enum_name, short nclass)
Definition node.cc:4364
void node_system_init()
Definition node.cc:4649
const bNodeInstanceKey NODE_INSTANCE_KEY_NONE
Definition node.cc:4021
void(*)(blender::nodes::value_elem::InverseElemEvalParams &params) NodeInverseElemEvalFunction
Definition BKE_node.hh:141
bNodeInstanceHash * node_instance_hash_new(const char *info)
Definition node.cc:4067
void node_remove_socket_ex(bNodeTree *ntree, bNode *node, bNodeSocket *sock, bool do_id_user)
Definition node.cc:2410
const char * node_static_socket_interface_type_new(int type, int subtype)
Definition node.cc:2222
void node_socket_move_default_value(Main &bmain, bNodeTree &tree, bNodeSocket &src, bNodeSocket &dst)
Definition node.cc:2846
bNodeTree * node_tree_from_id(ID *id)
Definition node.cc:3732
void node_tree_update_all_users(Main *main, ID *id)
Definition node.cc:4242
float2 node_from_view(const bNode *node, float2 view_loc)
Definition node.cc:3098
bNodeSocket * node_find_socket(bNode *node, eNodeSocketInOut in_out, StringRef identifier)
Definition node.cc:1829
void node_dimensions_get(const bNode *node, float *r_width, float *r_height)
Definition node.cc:4001
bNode * node_find_node_by_name(bNodeTree *ntree, const char *name)
Definition node.cc:2437
void node_tree_free_embedded_tree(bNodeTree *ntree)
Definition node.cc:3632
bool node_tree_is_registered(const bNodeTree *ntree)
Definition node.cc:1657
std::optional< eCustomDataType > socket_type_to_custom_data_type(eNodeSocketDatatype type)
Definition node.cc:4379
void node_modify_socket_type(bNodeTree *ntree, bNode *node, bNodeSocket *sock, const char *idname)
Definition node.cc:2020
void node_unique_name(bNodeTree *ntree, bNode *node)
Definition node.cc:2593
static blender::bke::bNodeSocketTemplate outputs[]
static blender::bke::bNodeSocketTemplate inputs[]
#define hash
Definition noise.c:154
signed char int8_t
Definition stdint.h:75
Definition DNA_ID.h:413
FreestyleLineStyle * linestyle
Definition BKE_node.hh:854
Compact definition of a node socket.
Definition BKE_node.hh:103
Defines a socket type.
Definition BKE_node.hh:151
const blender::CPPType * geometry_nodes_cpp_type
Definition BKE_node.hh:195
SocketGetCPPValueFunction get_base_cpp_value
Definition BKE_node.hh:193
void(* interface_init_socket)(ID *id, const bNodeTreeInterfaceSocket *interface_socket, bNode *node, bNodeSocket *socket, const char *data_path)
Definition BKE_node.hh:165
void(* draw_color)(bContext *C, PointerRNA *ptr, PointerRNA *node_ptr, float *r_color)
Definition BKE_node.hh:161
void(* free_self)(bNodeSocketType *stype)
Definition BKE_node.hh:188
void(* draw_color_simple)(const bNodeSocketType *socket_type, float *r_color)
Definition BKE_node.hh:162
void(* interface_draw)(ID *id, bNodeTreeInterfaceSocket *socket, bContext *C, uiLayout *layout)
Definition BKE_node.hh:164
void(* draw)(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr, const char *text)
Definition BKE_node.hh:159
const void * geometry_nodes_default_cpp_value
Definition BKE_node.hh:199
SocketGetGeometryNodesCPPValueFunction get_geometry_nodes_cpp_value
Definition BKE_node.hh:197
const blender::CPPType * base_cpp_type
Definition BKE_node.hh:191
void(* interface_from_socket)(ID *id, bNodeTreeInterfaceSocket *interface_socket, const bNode *node, const bNodeSocket *socket)
Definition BKE_node.hh:170
void(* update)(bNodeTree *ntree)
Definition BKE_node.hh:473
void(* foreach_nodeclass)(void *calldata, bNodeClassCallback func)
Definition BKE_node.hh:461
void(* node_add_init)(bNodeTree *ntree, bNode *bnode)
Definition BKE_node.hh:477
bool(* poll)(const bContext *C, bNodeTreeType *ntreetype)
Definition BKE_node.hh:463
void(* get_from_context)(const bContext *C, bNodeTreeType *ntreetype, bNodeTree **r_ntree, ID **r_id, ID **r_from)
Definition BKE_node.hh:465
void(* localize)(bNodeTree *localtree, bNodeTree *ntree)
Definition BKE_node.hh:469
void(* local_merge)(Main *bmain, bNodeTree *localtree, bNodeTree *ntree)
Definition BKE_node.hh:470
bool(* validate_link)(eNodeSocketDatatype from, eNodeSocketDatatype to)
Definition BKE_node.hh:475
bool(* valid_socket_type)(bNodeTreeType *ntreetype, bNodeSocketType *socket_type)
Definition BKE_node.hh:480
Defines a node type.
Definition BKE_node.hh:218
NodeInverseElemEvalFunction eval_inverse_elem
Definition BKE_node.hh:378
blender::nodes::NodeDeclaration * static_declaration
Definition BKE_node.hh:356
void(* freefunc_api)(PointerRNA *ptr)
Definition BKE_node.hh:281
void(* copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node)
Definition BKE_node.hh:277
NodeMaterialXFunction materialx_fn
Definition BKE_node.hh:320
NodeFreeExecFunction free_exec_fn
Definition BKE_node.hh:315
NodeInverseEvalFunction eval_inverse
Definition BKE_node.hh:385
NodeExecFunction exec_fn
Definition BKE_node.hh:316
const char * realtime_compositor_unsupported_message
Definition BKE_node.hh:333
NodeGetCompositorOperationFunction get_compositor_operation
Definition BKE_node.hh:324
int(* ui_class)(const bNode *node)
Definition BKE_node.hh:252
bool(* add_ui_poll)(const bContext *C)
Definition BKE_node.hh:288
void(* freefunc)(bNode *node)
Definition BKE_node.hh:275
void(* initfunc)(bNodeTree *ntree, bNode *node)
Definition BKE_node.hh:267
bool(* poll_instance)(const bNode *node, const bNodeTree *nodetree, const char **r_disabled_hint)
Definition BKE_node.hh:304
bNodeSocketTemplate * inputs
Definition BKE_node.hh:233
void(* labelfunc)(const bNodeTree *ntree, const bNode *node, char *label, int label_maxncpy)
Definition BKE_node.hh:249
NodeGPUExecFunction gpu_fn
Definition BKE_node.hh:318
NodeElemEvalFunction eval_elem
Definition BKE_node.hh:372
void(* draw_backdrop)(SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
Definition BKE_node.hh:243
void(* draw_buttons_ex)(uiLayout *, bContext *C, PointerRNA *ptr)
Definition BKE_node.hh:240
std::string(* ui_description_fn)(const bNode &node)
Definition BKE_node.hh:254
NodeMultiFunctionBuildFunction build_multi_function
Definition BKE_node.hh:336
NodeExtraInfoFunction get_extra_info
Definition BKE_node.hh:366
NodeGeometryExecFunction geometry_node_execute
Definition BKE_node.hh:339
const char * deprecation_notice
Definition BKE_node.hh:397
bNodeSocketTemplate * outputs
Definition BKE_node.hh:233
const char * enum_name_legacy
Definition BKE_node.hh:226
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
Definition BKE_node.hh:238
bool(* poll)(const bNodeType *ntype, const bNodeTree *nodetree, const char **r_disabled_hint)
Definition BKE_node.hh:299
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
Definition BKE_node.hh:363
bool(* insert_link)(bNodeTree *ntree, bNode *node, bNodeLink *link)
Definition BKE_node.hh:309
void(* copyfunc_api)(PointerRNA *ptr, const bNode *src_node)
Definition BKE_node.hh:282
NodeDeclareFunction declare
Definition BKE_node.hh:347
void(* register_operators)()
Definition BKE_node.hh:392
void(* free_self)(bNodeType *ntype)
Definition BKE_node.hh:311
NodeInitExecFunction init_exec_fn
Definition BKE_node.hh:314
void(* group_update_func)(bNodeTree *ntree, bNode *node)
Definition BKE_node.hh:259
void(* updatefunc)(bNodeTree *ntree, bNode *node)
Definition BKE_node.hh:257
NodeGetCompositorShaderNodeFunction get_compositor_shader_node
Definition BKE_node.hh:328
void(* initfunc_api)(const bContext *C, PointerRNA *ptr)
Definition BKE_node.hh:280
PointerRNA * ptr
Definition wm_files.cc:4126
uint8_t flag
Definition wm_window.cc:138