diff options
author | Johnny Matthews <guitargeek> | 2021-07-01 03:17:28 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-07-01 03:22:13 +0300 |
commit | c1fc18086118012637bdc5a32c5ced1742d69dac (patch) | |
tree | b395ce97d2a55eda946573431812f73831d9cd7a /source/blender/makesrna/intern/rna_nodetree.c | |
parent | 5a64c687ddccb3012b4fdb5c9cfb5d6459fcf39e (diff) |
Geometry Nodes: Curve Primitive Circle
This node has two modes: the first mode computes a circle from three
locations and a resolution. The second takes radius and resolution.
The first mode also outputs the center of the computed circle as
a vector.
Differential Revision: https://developer.blender.org/D11650
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-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 b3f46509955..c927c7df6bd 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -9425,6 +9425,32 @@ static void def_geo_attribute_vector_rotate(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update"); } +static void def_geo_curve_primitive_circle(StructRNA *srna) +{ + static const EnumPropertyItem mode_items[] = { + {GEO_NODE_CURVE_PRIMITIVE_CIRCLE_TYPE_POINTS, + "POINTS", + ICON_NONE, + "Points", + "Define the radius and location with three points"}, + {GEO_NODE_CURVE_PRIMITIVE_CIRCLE_TYPE_RADIUS, + "RADIUS", + ICON_NONE, + "Radius", + "Define the radius with a float"}, + {0, NULL, 0, NULL, NULL}, + }; + + PropertyRNA *prop; + + RNA_def_struct_sdna_from(srna, "NodeGeometryCurvePrimitiveCircle", "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", "Method used to determine radius and placement"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update"); +} + static void def_geo_point_rotate(StructRNA *srna) { static const EnumPropertyItem type_items[] = { |