From 9c004864511f80e48a48a4d8e459d8f05c40f64d Mon Sep 17 00:00:00 2001 From: Wannes Malfait Date: Mon, 11 Oct 2021 08:38:02 -0500 Subject: Geometry Nodes: Separate and Delete Geometry for fields Delete Geometry: This adds a copy of the old node in the legacy folder and updates the node to work with fields. The invert option is removed, because it is something that should be very easy with fields, and to be consistent with other nodes which have a selection. There is also a dropdown to select the domain, because the domain can't be determined from the field input. When the domain does not belong on any of the components an info message is displayed. Separate Geometry: A more general version of the old Point Separate node. The "inverted" output is the same as using the delete geometry node. Differential Revision: https://developer.blender.org/D12574 --- source/blender/makesdna/DNA_node_types.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index cbfa4e702ea..52a3755a959 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -1538,6 +1538,18 @@ 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; + /* script node mode */ #define NODE_SCRIPT_INTERNAL 0 #define NODE_SCRIPT_EXTERNAL 1 @@ -2192,6 +2204,12 @@ 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; + #ifdef __cplusplus } #endif -- cgit v1.2.3