diff options
author | Hans Goudey <h.goudey@me.com> | 2022-11-02 14:29:01 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-11-02 14:34:22 +0300 |
commit | 5f7ca5462d31ff56f16016d5f9e6a5489b30a05e (patch) | |
tree | c3c0fa2a326d4bcd972ac586ac0ef9c7f6a09711 /source/blender/makesdna/DNA_node_types.h | |
parent | 460c9d3d92e9f74254d58c6bb07d7e4fcb53e8b7 (diff) |
Geometry Nodes: Add index and value inputs to sample curve node
As described in T92474 and T91650, this patch adds two features to the
sample curve node. First is an index input, to allow choosing the curve
to sample for each point. Second is a custom field input, which is
evaluated on the control points of the curve and then sampled like the
other outputs. There is an "All Curves" option for the old behavior
which takes the length of all curves into account.
For invalid curve indices, the node outputs zeros (default values).
Invalid lengths and factors are clamped.
There have been various discussions about splitting the node up more,
but this is an intuitive combination of options and will work well
enough for current use cases. The node could still be generalized more
in the future.
Keep in mind that the source field is evaluated on curve control points,
not the evaluated points used for sampling. This is necessary so that
fields like "Index" work as expected.
Differential Revision: https://developer.blender.org/D16147
Diffstat (limited to 'source/blender/makesdna/DNA_node_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 74714cf7e41..0b7c17d44bb 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -1497,6 +1497,10 @@ typedef struct NodeGeometryCurveToPoints { typedef struct NodeGeometryCurveSample { /* GeometryNodeCurveSampleMode. */ uint8_t mode; + int8_t use_all_curves; + /* eCustomDataType. */ + int8_t data_type; + char _pad[1]; } NodeGeometryCurveSample; typedef struct NodeGeometryTransferAttribute { |