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
This commit is contained in:
Erik Abrahamsson 2022-01-13 19:17:03 +01:00
parent 743b9c5e1d
commit 3537abe84b
2 changed files with 11 additions and 3 deletions

View File

@ -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");
}
}
}
}

View File

@ -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