diff options
author | dilithjay <dilithjay@gmail.com> | 2021-09-22 17:41:12 +0300 |
---|---|---|
committer | dilithjay <dilithjay@gmail.com> | 2021-09-22 17:41:12 +0300 |
commit | 0d350e0193f1af82274ba78f5f93702c14646a86 (patch) | |
tree | 677b861ca8dd2fb7a34deb58644c6acff2756c07 /source/blender/makesrna | |
parent | 204b01a254ac2445fea217e5211b2ed6aef631ca (diff) |
Geometry Nodes: Curve Fillet Node
This node can be used to fillet splines at control points to
create a circular arc.
The implementation roughly follows T89227's design.
The node works in two main modes: Bezier and Poly
* Bezier: Creates a circular arc at vertices by changing
handle lengths (applicable only for Bezier splines).
* Poly: Creates a circular arc by creating vertices (as
many as defined by the Count fields input) along
the arc (applicable for all spline types).
In both modes, the radius of the created arc is defined
by the Radius fields input.
The Limit Radius attribute can be enabled to prevent
overlapping when the defined radius exceeds the maximum
possible radius for a given point.
Reviewed By: Hans Goudey
Differential Revision: https://developer.blender.org/D12115
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index ec53f35df4c..b631e76c094 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -10193,6 +10193,32 @@ static void def_geo_curve_subdivide(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update"); } +static void def_geo_curve_fillet(StructRNA *srna) +{ + PropertyRNA *prop; + + static EnumPropertyItem mode_items[] = { + {GEO_NODE_CURVE_FILLET_BEZIER, + "BEZIER", + 0, + "Bezier", + "Align Bezier handles to create circular arcs at each control point"}, + {GEO_NODE_CURVE_FILLET_POLY, + "POLY", + 0, + "Poly", + "Add control points along a circular arc (handle type is vector if Bezier Spline)"}, + {0, NULL, 0, NULL, NULL}, + }; + + RNA_def_struct_sdna_from(srna, "NodeGeometryCurveFillet", "storage"); + + prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, mode_items); + RNA_def_property_ui_text(prop, "Mode", "How to choose number of vertices on fillet"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update"); +} + static void def_geo_curve_to_points(StructRNA *srna) { PropertyRNA *prop; |