diff options
author | Erik <ecke101@gmail.com> | 2022-01-13 21:17:03 +0300 |
---|---|---|
committer | Erik <ecke101@gmail.com> | 2022-01-13 21:17:03 +0300 |
commit | 3537abe84bd49dbeb705c2c3a659d7a13a9c7862 (patch) | |
tree | c9dd2da4ec3d0b82f29e97ddbe9af361cd9e4d72 /source | |
parent | 743b9c5e1d9e9d23b8f51fd6778db8292de204ae (diff) |
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
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.c | 8 | ||||
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc | 6 |
2 files changed, 11 insertions, 3 deletions
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<decl::Geometry>(N_("Curves")); + b.add_output<decl::Geometry>(N_("Curve Instances")); b.add_output<decl::String>(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 |