From 3537abe84bd49dbeb705c2c3a659d7a13a9c7862 Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 13 Jan 2022 19:17:03 +0100 Subject: Geometry Nodes: Rename String to Curves socket Today many users seem to think the output from this node is a single curve with multiple splines. This patch renames the geometry output socket from "Curves" to "Curve Instances" to avoid confusion. Differential Revision: https://developer.blender.org/D13693 --- source/blender/blenloader/intern/versioning_300.c | 8 ++++++++ source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 152684db8f1..dd0cd9e24dc 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -2543,5 +2543,13 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + /* Rename socket on "String to Curves"-node. */ + LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { + if (ntree->type == NTREE_GEOMETRY) { + version_node_output_socket_name( + ntree, GEO_NODE_STRING_TO_CURVES, "Curves", "Curve Instances"); + } + } } } diff --git a/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc b/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc index 68d62a842e6..10c0d61ccb6 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc @@ -61,7 +61,7 @@ static void node_declare(NodeDeclarationBuilder &b) .make_available([](bNode &node) { node_storage(node).overflow = GEO_NODE_STRING_TO_CURVES_MODE_SCALE_TO_FIT; }); - b.add_output(N_("Curves")); + b.add_output(N_("Curve Instances")); b.add_output(N_("Remainder")).make_available([](bNode &node) { node_storage(node).overflow = GEO_NODE_STRING_TO_CURVES_MODE_TRUNCATE; }); @@ -281,7 +281,7 @@ static void node_geo_exec(GeoNodeExecParams params) } if (layout.positions.size() == 0) { - params.set_output("Curves", GeometrySet()); + params.set_output("Curve Instances", GeometrySet()); return; } @@ -299,7 +299,7 @@ static void node_geo_exec(GeoNodeExecParams params) params, layout.final_font_size, char_codes, instances); add_instances_from_handles(instances, char_handles, char_codes, layout.positions); - params.set_output("Curves", std::move(geometry_set_out)); + params.set_output("Curve Instances", std::move(geometry_set_out)); } } // namespace blender::nodes::node_geo_string_to_curves_cc -- cgit v1.2.3