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-07-05 20:27:12 +0300
committerHans Goudey <h.goudey@me.com>2021-07-05 20:27:12 +0300
commit29d6750134c4e42a2c5ff12040aa78f98720cf5c (patch)
treebe2587a6133944a1d930789e6c71e624daf5dd16 /source/blender/makesrna/intern/rna_nodetree.c
parentde70bcbb3684be446cf1106fd150d31d606ae415 (diff)
Geometry Nodes: Curve Primitive Line
This node creates a poly spline line in one of 2 modes: - Line between two points - Start Point, Direction, and Length Both modes create splines with only start and endpoints. A resample node can be used afterward to increase the point count. Differential Revision: https://developer.blender.org/D11769
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c26
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 93d5197f931..0a120837191 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -9488,6 +9488,32 @@ static void def_geo_curve_primitive_circle(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
}
+static void def_geo_curve_primitive_line(StructRNA *srna)
+{
+ static const EnumPropertyItem mode_items[] = {
+ {GEO_NODE_CURVE_PRIMITIVE_LINE_MODE_POINTS,
+ "POINTS",
+ ICON_NONE,
+ "Points",
+ "Define the start and end points of the line"},
+ {GEO_NODE_CURVE_PRIMITIVE_LINE_MODE_DIRECTION,
+ "DIRECTION",
+ ICON_NONE,
+ "Direction",
+ "Define a line with a start point, direction and length"},
+ {0, NULL, 0, NULL, NULL},
+ };
+
+ PropertyRNA *prop;
+
+ RNA_def_struct_sdna_from(srna, "NodeGeometryCurvePrimitiveLine", "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[] = {