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:
authorJohnny Matthews <guitargeek>2021-10-11 19:03:57 +0300
committerHans Goudey <h.goudey@me.com>2021-10-11 19:03:57 +0300
commitc1b4abf527f102ca20114e8179eca511d90784b3 (patch)
treeef5c074ada59fc25acf11034cd9e3d5daf1ae4e6 /source/blender/makesrna/intern/rna_nodetree.c
parent83f87d9f21fada613a70e7296120752e1e876dc3 (diff)
Geometry Nodes: Add Nodes to Get/Set Built-in Attributes
This commit implements T91780, adding nodes to get and set builtin attributes. Individual set nodes are used so that the values can be exposed for direct editing, which is useful for attributes like shade smooth and spline resolution. Individual input nodes are used to allow reusing nodes for multiple components, and to allow grouping multiple outputs conceptually in the same node in the future. Input Nodes - Radius - Curve Tilt - Curve Handle Positions - Is Shade Smooth - Spline Resolution - Is Spline Cyclic 'Set' Nodes - Curve Radius - Point Radius - Curve Tilt - Curve Handle Positions - Is Shade Smooth - Spline Resolution - Is Spline Cyclic Using hardcoded categories is necessary to add separators to the node menu. Differential Revision: https://developer.blender.org/D12687
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 9c1ce0d7bc4..47b2c7ea5c6 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -9689,6 +9689,18 @@ static void def_geo_legacy_curve_set_handles(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
}
+static void def_geo_curve_set_handle_positions(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ RNA_def_struct_sdna_from(srna, "NodeGeometrySetCurveHandlePositions", "storage");
+
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, rna_node_geometry_curve_handle_side_items);
+ RNA_def_property_ui_text(prop, "Mode", "Whether to update left and right handles");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
+}
+
static void def_geo_curve_select_handles(StructRNA *srna)
{
PropertyRNA *prop;