Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-10-15 22:08:52 +0300
committerHans Goudey <h.goudey@me.com>2021-10-15 22:09:08 +0300
commit76f386a37a9cf14ac729be048230f81a0a397fc8 (patch)
tree9363d859e4de44a55d3a7c3caca0b3a8321d4b92 /source/blender/makesdna
parent47a72ac4fdf777f2177037df3111a5cba2697bae (diff)
Geometry Nodes: Fields transfer attribute node
This commit adds an updated version of the old attribute transfer node. It works like a function node, so it works in the context of a geometry, with a simple data output. The "Nearest" mode finds the nearest element of the specified domain on the target geometry and copies the value directly from the target input. The "Nearest Face Interpolated" finds the nearest point on anywhere on the surface of the target mesh and linearly interpolates the value on the target from the face's corners. The node also has a new "Index" mode, which can pick data from specific indices on the target geometry. The implicit default is to do a simple copy from the target geometry, but any indices could be used. It is also possible to use a single value for the index to to retrieve a single value from an attribute at a certain index. Differential Revision: https://developer.blender.org/D12785
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_node_types.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index affe017feed..d4a2b3449e5 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -1512,6 +1512,16 @@ 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;
@@ -2174,6 +2184,12 @@ typedef enum GeometryNodeAttributeTransferMapMode {
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,
+ GEO_NODE_ATTRIBUTE_TRANSFER_INDEX = 2,
+} GeometryNodeAttributeTransferMode;
+
typedef enum GeometryNodeRaycastMapMode {
GEO_NODE_RAYCAST_INTERPOLATED = 0,
GEO_NODE_RAYCAST_NEAREST = 1,