diff options
Diffstat (limited to 'source/blender/makesdna/DNA_node_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 386 |
1 files changed, 288 insertions, 98 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 99c83b57521..0b24dfea0b0 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -38,6 +38,7 @@ struct ID; struct Image; struct ListBase; struct Material; +struct PreviewImage; struct Tex; struct bGPdata; struct bNodeInstanceHash; @@ -80,8 +81,21 @@ typedef struct bNodeStack { #define NS_CR_FIT 4 #define NS_CR_STRETCH 5 +/** Workaround to forward-declare C++ type in C header. */ +#ifdef __cplusplus +namespace blender::nodes { +class NodeDeclaration; +class SocketDeclaration; +} // namespace blender::nodes +using NodeDeclarationHandle = blender::nodes::NodeDeclaration; +using SocketDeclarationHandle = blender::nodes::SocketDeclaration; +#else +typedef struct NodeDeclarationHandle NodeDeclarationHandle; +typedef struct SocketDeclarationHandle SocketDeclarationHandle; +#endif + typedef struct bNodeSocket { - struct bNodeSocket *next, *prev, *new_sock; + struct bNodeSocket *next, *prev; /** User-defined properties. */ IDProperty *prop; @@ -92,15 +106,21 @@ typedef struct bNodeSocket { /** MAX_NAME. */ char name[64]; - /* XXX deprecated, only used for the Image and OutputFile nodes, - * should be removed at some point. - */ - /** Custom storage. */ + /** Only used for the Image and OutputFile nodes, should be removed at some point. */ void *storage; - short type, flag; - /** Max. number of links. Read via nodeSocketLinkLimit, - * because the limit might be defined on the socket type. */ + /** + * The socket's data type. #eNodeSocketDatatype. + */ + short type; + /** #eNodeSocketFlag */ + short flag; + /** + * Maximum number of links that can connect to the socket. Read via #nodeSocketLinkLimit, because + * the limit might be defined on the socket type, in which case this value does not have any + * effect. It is necessary to store this in the socket because it is exposed as an RNA property + * for custom nodes. + */ short limit; /** Input/output type. */ short in_out; @@ -109,6 +129,10 @@ typedef struct bNodeSocket { /** Runtime type identifier. */ char idname[64]; + /** + * The location of the sockets, in the view-space of the node editor. + * \note These are runtime data-- only calculated when drawing, and could be removed from DNA. + */ float locx, locy; /** Default input value used for unlinked sockets. */ @@ -145,16 +169,26 @@ typedef struct bNodeSocket { * restores pointer from matching own_index. */ struct bNodeSocket *groupsock DNA_DEPRECATED; - /** A link pointer, set in ntreeUpdateTree. */ + /** A link pointer, set in #BKE_ntree_update_main. */ struct bNodeLink *link; /* XXX deprecated, socket input values are stored in default_value now. * kept for forward compatibility */ /** Custom data for inputs, only UI writes in this. */ bNodeStack ns DNA_DEPRECATED; + + /** + * References a socket declaration that is owned by `node->declaration`. This is only runtime + * data. It has to be updated when the node declaration changes. + */ + const SocketDeclarationHandle *declaration; + + /** #eNodeTreeChangedFlag. */ + uint32_t changed_flag; + char _pad[4]; } bNodeSocket; -/* sock->type */ +/** #bNodeSocket.type & #bNodeSocketType.type */ typedef enum eNodeSocketDatatype { SOCK_CUSTOM = -1, /* socket has no integer type */ SOCK_FLOAT = 0, @@ -173,7 +207,7 @@ typedef enum eNodeSocketDatatype { SOCK_MATERIAL = 13, } eNodeSocketDatatype; -/* Socket shape. */ +/** Socket shape. */ typedef enum eNodeSocketDisplayShape { SOCK_DISPLAY_SHAPE_CIRCLE = 0, SOCK_DISPLAY_SHAPE_SQUARE = 1, @@ -183,13 +217,13 @@ typedef enum eNodeSocketDisplayShape { SOCK_DISPLAY_SHAPE_DIAMOND_DOT = 5, } eNodeSocketDisplayShape; -/* Socket side (input/output). */ +/** Socket side (input/output). */ typedef enum eNodeSocketInOut { SOCK_IN = 1 << 0, SOCK_OUT = 1 << 1, } eNodeSocketInOut; -/* #bNodeSocket.flag, first bit is selection. */ +/** #bNodeSocket.flag, first bit is selection. */ typedef enum eNodeSocketFlag { /** Hidden is user defined, to hide unused sockets. */ SOCK_HIDDEN = (1 << 1), @@ -219,19 +253,9 @@ typedef enum eNodeSocketFlag { SOCK_HIDE_LABEL = (1 << 12), } eNodeSocketFlag; -/** Workaround to forward-declare C++ type in C header. */ -#ifdef __cplusplus -namespace blender::nodes { -class NodeDeclaration; -} -using NodeDeclarationHandle = blender::nodes::NodeDeclaration; -#else -typedef struct NodeDeclarationHandle NodeDeclarationHandle; -#endif - -/* TODO: Limit data in bNode to what we want to see saved. */ +/** TODO: Limit data in #bNode to what we want to see saved. */ typedef struct bNode { - struct bNode *next, *prev, *new_node; + struct bNode *next, *prev; /** User-defined properties. */ IDProperty *prop; @@ -250,8 +274,9 @@ typedef struct bNode { /** Used as a boolean for execution. */ uint8_t need_exec; - - char _pad[1]; + char _pad2[5]; + /** #eNodeTreeChangedFlag. */ + uint32_t changed_flag; /** Custom user-defined color. */ float color[3]; @@ -292,10 +317,8 @@ typedef struct bNode { char _pad1[4]; - /** Entire boundbox (worldspace). */ + /** Entire bound-box (world-space). */ rctf totr; - /** Optional buttons area. */ - rctf butr; /** Optional preview area. */ rctf prvr; /** @@ -315,8 +338,6 @@ typedef struct bNode { char branch_tag; /** Used at runtime when iterating over node branches. */ char iter_flag; - /** Runtime during drawing. */ - struct uiBlock *block; /** * Describes the desired interface of the node. This is run-time data only. @@ -345,7 +366,7 @@ typedef struct bNode { #define NODE_PREVIEW 4 #define NODE_HIDDEN 8 #define NODE_ACTIVE 16 -#define NODE_ACTIVE_ID 32 +// #define NODE_ACTIVE_ID 32 /* deprecated */ /* Used to indicate which group output node is used and which viewer node is active. */ #define NODE_DO_OUTPUT 64 #define __NODE_GROUP_EDIT 128 /* DEPRECATED */ @@ -354,8 +375,7 @@ typedef struct bNode { /* node is disabled */ #define NODE_MUTED 512 // #define NODE_CUSTOM_NAME 1024 /* deprecated! */ -/* group node types: use const outputs by default */ -#define NODE_CONST_OUTPUT (1 << 11) +// #define NODE_CONST_OUTPUT (1 << 11) /* deprecated */ /* node is always behind others */ #define NODE_BACKGROUND (1 << 12) /* automatic flag for nodes included in transforms */ @@ -384,10 +404,6 @@ typedef struct bNode { #define __NODE_ACTIVE_PREVIEW (1 << 18) /* deprecated */ /* node->update */ -/* XXX NODE_UPDATE is a generic update flag. More fine-grained updates - * might be used in the future, but currently all work the same way. - */ -#define NODE_UPDATE 0xFFFF /* generic update flag (includes all others) */ #define NODE_UPDATE_ID 1 /* associated id data block has changed */ #define NODE_UPDATE_OPERATOR 2 /* node update triggered from update operator */ @@ -495,8 +511,12 @@ typedef struct bNodeTree { */ int cur_index; int flag; - /** Update flags. */ - int update; + /** + * Keeps track of what changed in the node tree until the next update. + * Should not be changed directly, instead use the functions in `BKE_node_tree_update.h`. + * #eNodeTreeChangedFlag. + */ + uint32_t changed_flag; /** Flag to prevent re-entrant update calls. */ short is_updating; /** Generic temporary flag for recursion check (DFS/BFS). */ @@ -530,7 +550,11 @@ typedef struct bNodeTree { * in case multiple different editors are used and make context ambiguous. */ bNodeInstanceKey active_viewer_key; - char _pad[4]; + /** + * A hash of the topology of the node tree leading up to the outputs. This is used to determine + * of the node tree changed in a way that requires updating geometry nodes or shaders. + */ + uint32_t output_topology_hash; /** Execution data. * @@ -550,19 +574,24 @@ typedef struct bNodeTree { int (*test_break)(void *); void (*update_draw)(void *); void *tbh, *prh, *sdh, *udh; + + /** Image representing what the node group does. */ + struct PreviewImage *preview; } bNodeTree; -/* ntree->type, index */ -#define NTREE_CUSTOM -1 /* for dynamically registered custom types */ +/** #NodeTree.type, index */ + +#define NTREE_UNDEFINED -2 /* Represents #NodeTreeTypeUndefined type. */ +#define NTREE_CUSTOM -1 /* for dynamically registered custom types */ #define NTREE_SHADER 0 #define NTREE_COMPOSIT 1 #define NTREE_TEXTURE 2 #define NTREE_GEOMETRY 3 -/* ntree->init, flag */ +/** #NodeTree.init, flag */ #define NTREE_TYPE_INIT 1 -/* ntree->flag */ +/** #NodeTree.flag */ #define NTREE_DS_EXPAND (1 << 0) /* for animation editors */ #define NTREE_COM_OPENCL (1 << 1) /* use opencl */ #define NTREE_TWO_PASS (1 << 2) /* two pass */ @@ -573,20 +602,6 @@ typedef struct bNodeTree { /* tree is localized copy, free when deleting node groups */ /* #define NTREE_IS_LOCALIZED (1 << 5) */ -/* ntree->update */ -typedef enum eNodeTreeUpdate { - NTREE_UPDATE = 0xFFFF, /* generic update flag (includes all others) */ - NTREE_UPDATE_LINKS = (1 << 0), /* links have been added or removed */ - NTREE_UPDATE_NODES = (1 << 1), /* nodes or sockets have been added or removed */ - NTREE_UPDATE_GROUP_IN = (1 << 4), /* group inputs have changed */ - NTREE_UPDATE_GROUP_OUT = (1 << 5), /* group outputs have changed */ - /* The field interface has changed. So e.g. an output that was always a field before is not - * anymore. This implies that the field type inferencing has to be done again. */ - NTREE_UPDATE_FIELD_INFERENCING = (1 << 6), - /* group has changed (generic flag including all other group flags) */ - NTREE_UPDATE_GROUP = (NTREE_UPDATE_GROUP_IN | NTREE_UPDATE_GROUP_OUT), -} eNodeTreeUpdate; - /* tree->execution_mode */ typedef enum eNodeTreeExecutionMode { NTREE_EXECUTION_MODE_TILED = 0, @@ -653,7 +668,8 @@ typedef struct bNodeSocketValueMaterial { struct Material *value; } bNodeSocketValueMaterial; -/* Data structs, for node->storage. */ +/* Data structs, for `node->storage`. */ + enum { CMP_NODE_MASKTYPE_ADD = 0, CMP_NODE_MASKTYPE_SUBTRACT = 1, @@ -692,7 +708,7 @@ typedef struct NodeFrame { short label_size; } NodeFrame; -/* This one has been replaced with ImageUser, keep it for do_versions(). */ +/** \note This one has been replaced with #ImageUser, keep it for do_versions(). */ typedef struct NodeImageAnim { int frames DNA_DEPRECATED; int sfra DNA_DEPRECATED; @@ -746,7 +762,7 @@ typedef struct NodeEllipseMask { char _pad[4]; } NodeEllipseMask; -/* Layer info for image node outputs. */ +/** Layer info for image node outputs. */ typedef struct NodeImageLayer { /* index in the Image->layers->passes lists */ int pass_index DNA_DEPRECATED; @@ -784,7 +800,7 @@ typedef struct NodeAntiAliasingData { float corner_rounding; } NodeAntiAliasingData; -/* NOTE: Only for do-version code. */ +/** \note Only for do-version code. */ typedef struct NodeHueSat { float hue, sat, val; } NodeHueSat; @@ -796,7 +812,9 @@ typedef struct NodeImageFile { int sfra, efra; } NodeImageFile; -/* XXX first struct fields should match NodeImageFile to ensure forward compatibility */ +/** + * XXX: first struct fields should match #NodeImageFile to ensure forward compatibility. + */ typedef struct NodeImageMultiFile { /** 1024 = FILE_MAX. */ char base_path[1024]; @@ -904,6 +922,11 @@ typedef struct NodeColorspill { float uspillr, uspillg, uspillb; } NodeColorspill; +typedef struct NodeConvertColorSpace { + char from_color_space[64]; + char to_color_space[64]; +} NodeConvertColorSpace; + typedef struct NodeDilateErode { char falloff; } NodeDilateErode; @@ -1045,7 +1068,7 @@ typedef struct NodeShaderPrincipled { char _pad[3]; } NodeShaderPrincipled; -/* TEX_output */ +/** TEX_output. */ typedef struct TexNodeOutput { char name[64]; } TexNodeOutput; @@ -1183,6 +1206,16 @@ typedef struct NodeDenoise { char prefilter; } NodeDenoise; +typedef struct NodeMapRange { + /* CustomDataType */ + uint8_t data_type; + + /* NodeMapRangeType. */ + uint8_t interpolation_type; + uint8_t clamp; + char _pad[5]; +} NodeMapRange; + typedef struct NodeAttributeClamp { /* CustomDataType. */ uint8_t data_type; @@ -1235,6 +1268,13 @@ typedef struct NodeRandomValue { uint8_t data_type; } NodeRandomValue; +typedef struct NodeAccumulateField { + /* CustomDataType. */ + uint8_t data_type; + /* AttributeDomain. */ + uint8_t domain; +} NodeAccumulateField; + typedef struct NodeAttributeRandomize { /* CustomDataType. */ uint8_t data_type; @@ -1280,10 +1320,22 @@ typedef struct NodeAttributeCurveMap { CurveMapping *curve_rgb; } NodeAttributeCurveMap; +typedef struct NodeInputBool { + uint8_t boolean; +} NodeInputBool; + +typedef struct NodeInputInt { + int integer; +} NodeInputInt; + typedef struct NodeInputVector { float vector[3]; } NodeInputVector; +typedef struct NodeInputColor { + float color[4]; +} NodeInputColor; + typedef struct NodeInputString { char *string; } NodeInputString; @@ -1322,6 +1374,11 @@ typedef struct NodeGeometryPointTranslate { uint8_t input_type; } NodeGeometryPointTranslate; +typedef struct NodeGeometryExtrudeMesh { + /* GeometryNodeExtrudeMeshMode */ + uint8_t mode; +} NodeGeometryExtrudeMesh; + typedef struct NodeGeometryObjectInfo { /* GeometryNodeTransformSpace. */ uint8_t transform_space; @@ -1421,6 +1478,11 @@ typedef struct NodeGeometryCurveSplineType { uint8_t spline_type; } NodeGeometryCurveSplineType; +typedef struct NodeGeometrySetCurveHandlePositions { + /* GeometryNodeCurveHandleMode. */ + uint8_t mode; +} NodeGeometrySetCurveHandlePositions; + typedef struct NodeGeometryCurveSetHandles { /* GeometryNodeCurveHandleType. */ uint8_t handle_type; @@ -1435,6 +1497,11 @@ typedef struct NodeGeometryCurveSelectHandles { uint8_t mode; } NodeGeometryCurveSelectHandles; +typedef struct NodeGeometryCurvePrimitiveArc { + /* GeometryNodeCurvePrimitiveArcMode. */ + uint8_t mode; +} NodeGeometryCurvePrimitiveArc; + typedef struct NodeGeometryCurvePrimitiveLine { /* GeometryNodeCurvePrimitiveLineMode. */ uint8_t mode; @@ -1492,13 +1559,27 @@ typedef struct NodeGeometryAttributeTransfer { uint8_t mapping; } NodeGeometryAttributeTransfer; +typedef struct NodeGeometryTransferAttribute { + /* CustomDataType. */ + int8_t data_type; + /* AttributeDomain. */ + int8_t domain; + /* GeometryNodeAttributeTransferMode. */ + uint8_t mode; + char _pad[1]; +} NodeGeometryTransferAttribute; + typedef struct NodeGeometryRaycast { /* GeometryNodeRaycastMapMode. */ uint8_t mapping; + /* CustomDataType. */ + int8_t data_type; + + /* Deprecated input types in new Ray-cast node. Can be removed when legacy nodes are no longer + * supported. */ uint8_t input_type_ray_direction; uint8_t input_type_ray_length; - char _pad[1]; } NodeGeometryRaycast; typedef struct NodeGeometryCurveFill { @@ -1527,6 +1608,38 @@ typedef struct NodeGeometryStringToCurves { char _pad[1]; } NodeGeometryStringToCurves; +typedef struct NodeGeometryDeleteGeometry { + /* AttributeDomain. */ + int8_t domain; + /* GeometryNodeDeleteGeometryMode. */ + int8_t mode; +} NodeGeometryDeleteGeometry; + +typedef struct NodeGeometrySeparateGeometry { + /* AttributeDomain. */ + int8_t domain; +} NodeGeometrySeparateGeometry; + +typedef struct NodeGeometryImageTexture { + int interpolation; + int extension; +} NodeGeometryImageTexture; + +typedef struct NodeGeometryViewer { + /* CustomDataType. */ + int8_t data_type; +} NodeGeometryViewer; + +typedef struct NodeFunctionCompare { + /* NodeCompareOperation */ + int8_t operation; + /* eNodeSocketDatatype */ + int8_t data_type; + /* NodeCompareMode */ + int8_t mode; + char _pad[1]; +} NodeFunctionCompare; + /* script node mode */ #define NODE_SCRIPT_INTERNAL 0 #define NODE_SCRIPT_EXTERNAL 1 @@ -1538,14 +1651,17 @@ typedef struct NodeGeometryStringToCurves { #define NODE_IES_INTERNAL 0 #define NODE_IES_EXTERNAL 1 -/* frame node flags */ +/* Frame node flags. */ + #define NODE_FRAME_SHRINK 1 /* keep the bounding box minimal */ #define NODE_FRAME_RESIZEABLE 2 /* test flag, if frame can be resized by user */ -/* proxy node flags */ +/* Proxy node flags. */ + #define NODE_PROXY_AUTOTYPE 1 /* automatically change output type based on link */ -/* comp channel matte */ +/* Comp channel matte. */ + #define CMP_NODE_CHANNEL_MATTE_CS_RGB 1 #define CMP_NODE_CHANNEL_MATTE_CS_HSV 2 #define CMP_NODE_CHANNEL_MATTE_CS_YUV 3 @@ -1567,7 +1683,7 @@ typedef struct NodeGeometryStringToCurves { #define SHD_VECT_TRANSFORM_SPACE_OBJECT 1 #define SHD_VECT_TRANSFORM_SPACE_CAMERA 2 -/* attribute */ +/** #NodeShaderAttribute.type */ enum { SHD_ATTRIBUTE_GEOMETRY = 0, SHD_ATTRIBUTE_OBJECT = 1, @@ -1701,7 +1817,7 @@ enum { #define SHD_AO_INSIDE 1 #define SHD_AO_LOCAL 2 -/* Mapping node vector types. */ +/** Mapping node vector types. */ enum { NODE_MAPPING_TYPE_POINT = 0, NODE_MAPPING_TYPE_TEXTURE = 1, @@ -1709,7 +1825,7 @@ enum { NODE_MAPPING_TYPE_NORMAL = 3, }; -/* Rotation node vector types. */ +/** Rotation node vector types. */ enum { NODE_VECTOR_ROTATE_TYPE_AXIS = 0, NODE_VECTOR_ROTATE_TYPE_AXIS_X = 1, @@ -1721,7 +1837,6 @@ enum { /* math node clamp */ #define SHD_MATH_CLAMP 1 -/* Math node operations. */ typedef enum NodeMathOperation { NODE_MATH_ADD = 0, NODE_MATH_SUBTRACT = 1, @@ -1765,7 +1880,6 @@ typedef enum NodeMathOperation { NODE_MATH_SMOOTH_MAX = 39, } NodeMathOperation; -/* Vector Math node operations. */ typedef enum NodeVectorMathOperation { NODE_VECTOR_MATH_ADD = 0, NODE_VECTOR_MATH_SUBTRACT = 1, @@ -1799,24 +1913,39 @@ typedef enum NodeVectorMathOperation { NODE_VECTOR_MATH_MULTIPLY_ADD = 26, } NodeVectorMathOperation; -/* Boolean math node operations. */ -enum { +typedef enum NodeBooleanMathOperation { NODE_BOOLEAN_MATH_AND = 0, NODE_BOOLEAN_MATH_OR = 1, NODE_BOOLEAN_MATH_NOT = 2, -}; -/* Float compare node operations. */ -typedef enum FloatCompareOperation { - NODE_FLOAT_COMPARE_LESS_THAN = 0, - NODE_FLOAT_COMPARE_LESS_EQUAL = 1, - NODE_FLOAT_COMPARE_GREATER_THAN = 2, - NODE_FLOAT_COMPARE_GREATER_EQUAL = 3, - NODE_FLOAT_COMPARE_EQUAL = 4, - NODE_FLOAT_COMPARE_NOT_EQUAL = 5, -} FloatCompareOperation; - -/* Float to Int node operations. */ + NODE_BOOLEAN_MATH_NAND = 3, + NODE_BOOLEAN_MATH_NOR = 4, + NODE_BOOLEAN_MATH_XNOR = 5, + NODE_BOOLEAN_MATH_XOR = 6, + + NODE_BOOLEAN_MATH_IMPLY = 7, + NODE_BOOLEAN_MATH_NIMPLY = 8, +} NodeBooleanMathOperation; + +typedef enum NodeCompareMode { + NODE_COMPARE_MODE_ELEMENT = 0, + NODE_COMPARE_MODE_LENGTH = 1, + NODE_COMPARE_MODE_AVERAGE = 2, + NODE_COMPARE_MODE_DOT_PRODUCT = 3, + NODE_COMPARE_MODE_DIRECTION = 4 +} NodeCompareMode; + +typedef enum NodeCompareOperation { + NODE_COMPARE_LESS_THAN = 0, + NODE_COMPARE_LESS_EQUAL = 1, + NODE_COMPARE_GREATER_THAN = 2, + NODE_COMPARE_GREATER_EQUAL = 3, + NODE_COMPARE_EQUAL = 4, + NODE_COMPARE_NOT_EQUAL = 5, + NODE_COMPARE_COLOR_BRIGHTER = 6, + NODE_COMPARE_COLOR_DARKER = 7, +} NodeCompareOperation; + typedef enum FloatToIntRoundingMode { FN_NODE_FLOAT_TO_INT_ROUND = 0, FN_NODE_FLOAT_TO_INT_FLOOR = 1, @@ -1824,13 +1953,13 @@ typedef enum FloatToIntRoundingMode { FN_NODE_FLOAT_TO_INT_TRUNCATE = 3, } FloatToIntRoundingMode; -/* Clamp node types. */ +/** Clamp node types. */ enum { NODE_CLAMP_MINMAX = 0, NODE_CLAMP_RANGE = 1, }; -/* Map range node types. */ +/** Map range node types. */ enum { NODE_MAP_RANGE_LINEAR = 0, NODE_MAP_RANGE_STEPPED = 1, @@ -1842,14 +1971,15 @@ enum { #define SHD_MIXRGB_USE_ALPHA 1 #define SHD_MIXRGB_CLAMP 2 -/* subsurface */ +/* Subsurface. */ + enum { #ifdef DNA_DEPRECATED_ALLOW SHD_SUBSURFACE_COMPATIBLE = 0, /* Deprecated */ SHD_SUBSURFACE_CUBIC = 1, SHD_SUBSURFACE_GAUSSIAN = 2, #endif - SHD_SUBSURFACE_DIFFUSION = 3, + SHD_SUBSURFACE_BURLEY = 3, SHD_SUBSURFACE_RANDOM_WALK_FIXED_RADIUS = 4, SHD_SUBSURFACE_RANDOM_WALK = 5, }; @@ -1873,25 +2003,29 @@ enum { /* viewer and composite output. */ #define CMP_NODE_OUTPUT_IGNORE_ALPHA 1 -/* Plane track deform node */ +/* Plane track deform node. */ + enum { CMP_NODEFLAG_PLANETRACKDEFORM_MOTION_BLUR = 1, }; -/* Stabilization node */ +/* Stabilization node. */ + enum { CMP_NODEFLAG_STABILIZE_INVERSE = 1, }; /* Set Alpha Node. */ -/* `NodeSetAlpha.mode` */ + +/** #NodeSetAlpha.mode */ typedef enum CMPNodeSetAlphaMode { CMP_NODE_SETALPHA_MODE_APPLY = 0, CMP_NODE_SETALPHA_MODE_REPLACE_ALPHA = 1, } CMPNodeSetAlphaMode; /* Denoise Node. */ -/* `NodeDenoise.prefilter` */ + +/** #NodeDenoise.prefilter */ typedef enum CMPNodeDenoisePrefilter { CMP_NODE_DENOISE_PREFILTER_FAST = 0, CMP_NODE_DENOISE_PREFILTER_NONE = 1, @@ -1985,6 +2119,7 @@ typedef enum GeometryNodeTriangulateQuads { GEO_NODE_TRIANGULATE_QUAD_FIXED = 1, GEO_NODE_TRIANGULATE_QUAD_ALTERNATE = 2, GEO_NODE_TRIANGULATE_QUAD_SHORTEDGE = 3, + GEO_NODE_TRIANGULATE_QUAD_LONGEDGE = 4, } GeometryNodeTriangulateQuads; typedef enum GeometryNodePointInstanceType { @@ -2016,11 +2151,22 @@ typedef enum GeometryNodeDistributePointsOnFacesMode { GEO_NODE_POINT_DISTRIBUTE_POINTS_ON_FACES_POISSON = 1, } GeometryNodeDistributePointsOnFacesMode; +typedef enum GeometryNodeExtrudeMeshMode { + GEO_NODE_EXTRUDE_MESH_VERTICES = 0, + GEO_NODE_EXTRUDE_MESH_EDGES = 1, + GEO_NODE_EXTRUDE_MESH_FACES = 2, +} GeometryNodeExtrudeMeshMode; + typedef enum GeometryNodeRotatePointsType { GEO_NODE_POINT_ROTATE_TYPE_EULER = 0, GEO_NODE_POINT_ROTATE_TYPE_AXIS_ANGLE = 1, } GeometryNodeRotatePointsType; +typedef enum FunctionNodeRotatePointsType { + FN_NODE_ROTATE_EULER_TYPE_EULER = 0, + FN_NODE_ROTATE_EULER_TYPE_AXIS_ANGLE = 1, +} FunctionNodeRotatePointsType; + typedef enum GeometryNodeAttributeVectorRotateMode { GEO_NODE_VECTOR_ROTATE_TYPE_AXIS = 0, GEO_NODE_VECTOR_ROTATE_TYPE_AXIS_X = 1, @@ -2041,6 +2187,11 @@ typedef enum GeometryNodeRotatePointsSpace { GEO_NODE_POINT_ROTATE_SPACE_POINT = 1, } GeometryNodeRotatePointsSpace; +typedef enum FunctionNodeRotateEulerSpace { + FN_NODE_ROTATE_EULER_SPACE_OBJECT = 0, + FN_NODE_ROTATE_EULER_SPACE_LOCAL = 1, +} FunctionNodeRotateEulerSpace; + typedef enum GeometryNodeAlignRotationToVectorAxis { GEO_NODE_ALIGN_ROTATION_TO_VECTOR_AXIS_X = 0, GEO_NODE_ALIGN_ROTATION_TO_VECTOR_AXIS_Y = 1, @@ -2054,6 +2205,19 @@ typedef enum GeometryNodeAlignRotationToVectorPivotAxis { GEO_NODE_ALIGN_ROTATION_TO_VECTOR_PIVOT_AXIS_Z = 3, } GeometryNodeAlignRotationToVectorPivotAxis; +typedef enum NodeAlignEulerToVectorAxis { + FN_NODE_ALIGN_EULER_TO_VECTOR_AXIS_X = 0, + FN_NODE_ALIGN_EULER_TO_VECTOR_AXIS_Y = 1, + FN_NODE_ALIGN_EULER_TO_VECTOR_AXIS_Z = 2, +} NodeAlignEulerToVectorAxis; + +typedef enum NodeAlignEulerToVectorPivotAxis { + FN_NODE_ALIGN_EULER_TO_VECTOR_PIVOT_AXIS_AUTO = 0, + FN_NODE_ALIGN_EULER_TO_VECTOR_PIVOT_AXIS_X = 1, + FN_NODE_ALIGN_EULER_TO_VECTOR_PIVOT_AXIS_Y = 2, + FN_NODE_ALIGN_EULER_TO_VECTOR_PIVOT_AXIS_Z = 3, +} NodeAlignEulerToVectorPivotAxis; + typedef enum GeometryNodeTransformSpace { GEO_NODE_TRANSFORM_SPACE_ORIGINAL = 0, GEO_NODE_TRANSFORM_SPACE_RELATIVE = 1, @@ -2080,6 +2244,11 @@ typedef enum GeometryNodeMeshLineCountMode { GEO_NODE_MESH_LINE_COUNT_RESOLUTION = 1, } GeometryNodeMeshLineCountMode; +typedef enum GeometryNodeCurvePrimitiveArcMode { + GEO_NODE_CURVE_PRIMITIVE_ARC_TYPE_POINTS = 0, + GEO_NODE_CURVE_PRIMITIVE_ARC_TYPE_RADIUS = 1, +} GeometryNodeCurvePrimitiveArcMode; + typedef enum GeometryNodeCurvePrimitiveLineMode { GEO_NODE_CURVE_PRIMITIVE_LINE_MODE_POINTS = 0, GEO_NODE_CURVE_PRIMITIVE_LINE_MODE_DIRECTION = 1 @@ -2115,9 +2284,15 @@ typedef enum GeometryNodeCurveFilletMode { } GeometryNodeCurveFilletMode; typedef enum GeometryNodeAttributeTransferMapMode { + GEO_NODE_LEGACY_ATTRIBUTE_TRANSFER_NEAREST_FACE_INTERPOLATED = 0, + GEO_NODE_LEGACY_ATTRIBUTE_TRANSFER_NEAREST = 1, +} GeometryNodeAttributeTransferMapMode; + +typedef enum GeometryNodeAttributeTransferMode { GEO_NODE_ATTRIBUTE_TRANSFER_NEAREST_FACE_INTERPOLATED = 0, GEO_NODE_ATTRIBUTE_TRANSFER_NEAREST = 1, -} GeometryNodeAttributeTransferMapMode; + GEO_NODE_ATTRIBUTE_TRANSFER_INDEX = 2, +} GeometryNodeAttributeTransferMode; typedef enum GeometryNodeRaycastMapMode { GEO_NODE_RAYCAST_INTERPOLATED = 0, @@ -2158,6 +2333,21 @@ typedef enum GeometryNodeStringToCurvesAlignYMode { GEO_NODE_STRING_TO_CURVES_ALIGN_Y_BOTTOM = 4, } GeometryNodeStringToCurvesAlignYMode; +typedef enum GeometryNodeDeleteGeometryMode { + GEO_NODE_DELETE_GEOMETRY_MODE_ALL = 0, + GEO_NODE_DELETE_GEOMETRY_MODE_EDGE_FACE = 1, + GEO_NODE_DELETE_GEOMETRY_MODE_ONLY_FACE = 2, +} GeometryNodeDeleteGeometryMode; + +typedef enum GeometryNodeRealizeInstancesFlag { + GEO_NODE_REALIZE_INSTANCES_LEGACY_BEHAVIOR = (1 << 0), +} GeometryNodeRealizeInstancesFlag; + +typedef enum GeometryNodeScaleElementsMode { + GEO_NODE_SCALE_ELEMENTS_UNIFORM = 0, + GEO_NODE_SCALE_ELEMENTS_SINGLE_AXIS = 1, +} GeometryNodeScaleElementsMode; + #ifdef __cplusplus } #endif |