[Bf-blender-cvs] [3537abe84bd] master: Geometry Nodes: Rename String to Curves socket

Erik noreply at git.blender.org
Thu Jan 13 19:19:39 CET 2022


Commit: 3537abe84bd49dbeb705c2c3a659d7a13a9c7862
Author: Erik
Date:   Thu Jan 13 19:17:03 2022 +0100
Branches: master
https://developer.blender.org/rB3537abe84bd49dbeb705c2c3a659d7a13a9c7862

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

===================================================================

M	source/blender/blenloader/intern/versioning_300.c
M	source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc

===================================================================

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



More information about the Bf-blender-cvs mailing list