From 4593fb52cf809de29bffa8f18af9a9a792def30d Mon Sep 17 00:00:00 2001 From: Aleksi Juvani Date: Wed, 29 Jun 2022 12:25:20 -0500 Subject: Geometry Nodes: UV Unwrap and Pack Islands Nodes This commit adds new Unwrap and Pack Islands nodes, with equivalent functionality to the existing Unwrap and Pack Islands operators. The Unwrap node uses generic boolean attributes to determine seams instead of looking at the seam flags in the mesh geometry. Unlike the Unwrap operator, the Unwrap node doesn't perform aspect ratio correction, because this is trivial for the user to implement with a Vector Math node if it is desired. The Unwrap node implicitly performs a Pack Islands operation upon completion, because the results may not be generally useful otherwise. This matches the behaviour of the Unwrap operator. The nodes use the existing Vector socket type, and do not introduce a new 2D Vector type (see T92765). Differential Revision: https://developer.blender.org/D14389 --- source/blender/makesdna/DNA_node_types.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/blender/makesdna/DNA_node_types.h') diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 3f3eb6e0571..76d8207eead 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -1455,6 +1455,11 @@ typedef struct NodeGeometryViewer { int8_t data_type; } NodeGeometryViewer; +typedef struct NodeGeometryUVUnwrap { + /* GeometryNodeUVUnwrapMethod. */ + uint8_t method; +} NodeGeometryUVUnwrap; + typedef struct NodeFunctionCompare { /* NodeCompareOperation */ int8_t operation; @@ -2005,6 +2010,11 @@ typedef enum GeometryNodeMergeByDistanceMode { GEO_NODE_MERGE_BY_DISTANCE_MODE_CONNECTED = 1, } GeometryNodeMergeByDistanceMode; +typedef enum GeometryNodeUVUnwrapMethod { + GEO_NODE_UV_UNWRAP_METHOD_ANGLE_BASED = 0, + GEO_NODE_UV_UNWRAP_METHOD_CONFORMAL = 1, +} GeometryNodeUVUnwrapMethod; + typedef enum GeometryNodeMeshLineMode { GEO_NODE_MESH_LINE_MODE_END_POINTS = 0, GEO_NODE_MESH_LINE_MODE_OFFSET = 1, -- cgit v1.2.3