[Bf-blender-cvs] [203ab983ceb] master: Geometry Nodes: Rename node and socket for "Group ID" convention

Hans Goudey noreply at git.blender.org
Thu Jan 19 23:57:03 CET 2023


Commit: 203ab983ceb7d791eae6d702f614f596314026d7
Author: Hans Goudey
Date:   Thu Jan 19 16:55:37 2023 -0600
Branches: master
https://developer.blender.org/rB203ab983ceb7d791eae6d702f614f596314026d7

Geometry Nodes: Rename node and socket for "Group ID" convention

Based on discussion about T102962, rename the "Face Set Boundaries" node
to "Face Group Boundaries" and the Accumulate Field node's "Group Index"
socket to "Group ID". This convention of "__ Group" and "Group ID" will
be used more in other nodes in the future.

This commit doesn't affect forwards or backwards compatibility.

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

M	source/blender/blenkernel/BKE_node.h
M	source/blender/nodes/NOD_static_types.h
M	source/blender/nodes/geometry/CMakeLists.txt
M	source/blender/nodes/geometry/node_geometry_register.cc
M	source/blender/nodes/geometry/node_geometry_register.hh
M	source/blender/nodes/geometry/nodes/node_geo_accumulate_field.cc
R082	source/blender/nodes/geometry/nodes/node_geo_mesh_face_set_boundaries.cc	source/blender/nodes/geometry/nodes/node_geo_mesh_face_group_boundaries.cc

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

diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index dc5b1791bdb..d2f4c6e3b6e 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -1512,7 +1512,7 @@ void BKE_nodetree_remove_layer_n(struct bNodeTree *ntree, struct Scene *scene, i
 #define GEO_NODE_INPUT_SHORTEST_EDGE_PATHS 1168
 #define GEO_NODE_EDGE_PATHS_TO_CURVES 1169
 #define GEO_NODE_EDGE_PATHS_TO_SELECTION 1170
-#define GEO_NODE_MESH_FACE_SET_BOUNDARIES 1171
+#define GEO_NODE_MESH_FACE_GROUP_BOUNDARIES 1171
 #define GEO_NODE_DISTRIBUTE_POINTS_IN_VOLUME 1172
 #define GEO_NODE_SELF_OBJECT 1173
 #define GEO_NODE_SAMPLE_INDEX 1174
diff --git a/source/blender/nodes/NOD_static_types.h b/source/blender/nodes/NOD_static_types.h
index 479700da7c9..b9f747b2e4f 100644
--- a/source/blender/nodes/NOD_static_types.h
+++ b/source/blender/nodes/NOD_static_types.h
@@ -358,7 +358,7 @@ DefNode(GeometryNode, GEO_NODE_JOIN_GEOMETRY, 0, "JOIN_GEOMETRY", JoinGeometry,
 DefNode(GeometryNode, GEO_NODE_MATERIAL_SELECTION, 0, "MATERIAL_SELECTION", MaterialSelection, "Material Selection", "Provide a selection of faces that use the specified material")
 DefNode(GeometryNode, GEO_NODE_MERGE_BY_DISTANCE, def_geo_merge_by_distance,"MERGE_BY_DISTANCE", MergeByDistance, "Merge by Distance", "Merge vertices or points within a given distance")
 DefNode(GeometryNode, GEO_NODE_MESH_BOOLEAN, def_geo_boolean, "MESH_BOOLEAN", MeshBoolean, "Mesh Boolean", "Cut, subtract, or join multiple mesh inputs")
-DefNode(GeometryNode, GEO_NODE_MESH_FACE_SET_BOUNDARIES, 0, "MESH_FACE_SET_BOUNDARIES", MeshFaceSetBoundaries, "Face Set Boundaries", "Find edges on the boundaries between face sets")
+DefNode(GeometryNode, GEO_NODE_MESH_FACE_GROUP_BOUNDARIES, 0, "MESH_FACE_SET_BOUNDARIES", MeshFaceSetBoundaries, "Face Group Boundaries", "Find edges on the boundaries between groups of faces with the same ID value")
 DefNode(GeometryNode, GEO_NODE_MESH_PRIMITIVE_CIRCLE, def_geo_mesh_circle, "MESH_PRIMITIVE_CIRCLE", MeshCircle, "Mesh Circle", "Generate a circular ring of edges")
 DefNode(GeometryNode, GEO_NODE_MESH_PRIMITIVE_CONE, def_geo_mesh_cone, "MESH_PRIMITIVE_CONE",MeshCone, "Cone", "Generate a cone mesh")
 DefNode(GeometryNode, GEO_NODE_MESH_PRIMITIVE_CUBE, 0, "MESH_PRIMITIVE_CUBE",MeshCube, "Cube", "Generate a cuboid mesh with variable side lengths and subdivisions")
diff --git a/source/blender/nodes/geometry/CMakeLists.txt b/source/blender/nodes/geometry/CMakeLists.txt
index eecc79f2b12..8012b463a54 100644
--- a/source/blender/nodes/geometry/CMakeLists.txt
+++ b/source/blender/nodes/geometry/CMakeLists.txt
@@ -111,7 +111,7 @@ set(SRC
   nodes/node_geo_material_replace.cc
   nodes/node_geo_material_selection.cc
   nodes/node_geo_merge_by_distance.cc
-  nodes/node_geo_mesh_face_set_boundaries.cc
+  nodes/node_geo_mesh_face_group_boundaries.cc
   nodes/node_geo_mesh_primitive_circle.cc
   nodes/node_geo_mesh_primitive_cone.cc
   nodes/node_geo_mesh_primitive_cube.cc
diff --git a/source/blender/nodes/geometry/node_geometry_register.cc b/source/blender/nodes/geometry/node_geometry_register.cc
index 6305271ee8f..8d24d9bd732 100644
--- a/source/blender/nodes/geometry/node_geometry_register.cc
+++ b/source/blender/nodes/geometry/node_geometry_register.cc
@@ -95,7 +95,7 @@ void register_geometry_nodes()
   register_node_type_geo_material_replace();
   register_node_type_geo_material_selection();
   register_node_type_geo_merge_by_distance();
-  register_node_type_geo_mesh_face_set_boundaries();
+  register_node_type_geo_mesh_face_group_boundaries();
   register_node_type_geo_mesh_primitive_circle();
   register_node_type_geo_mesh_primitive_cone();
   register_node_type_geo_mesh_primitive_cube();
diff --git a/source/blender/nodes/geometry/node_geometry_register.hh b/source/blender/nodes/geometry/node_geometry_register.hh
index 213bec79045..ca64e7b9904 100644
--- a/source/blender/nodes/geometry/node_geometry_register.hh
+++ b/source/blender/nodes/geometry/node_geometry_register.hh
@@ -92,7 +92,7 @@ void register_node_type_geo_join_geometry();
 void register_node_type_geo_material_replace();
 void register_node_type_geo_material_selection();
 void register_node_type_geo_merge_by_distance();
-void register_node_type_geo_mesh_face_set_boundaries();
+void register_node_type_geo_mesh_face_group_boundaries();
 void register_node_type_geo_mesh_primitive_circle();
 void register_node_type_geo_mesh_primitive_cone();
 void register_node_type_geo_mesh_primitive_cube();
diff --git a/source/blender/nodes/geometry/nodes/node_geo_accumulate_field.cc b/source/blender/nodes/geometry/nodes/node_geo_accumulate_field.cc
index 1293dd9c0d2..f7a8496868e 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_accumulate_field.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_accumulate_field.cc
@@ -34,7 +34,7 @@ static void node_declare(NodeDeclarationBuilder &b)
       .default_value(1)
       .supports_field()
       .description(N_(value_in_description));
-  b.add_input<decl::Int>(N_("Group Index"))
+  b.add_input<decl::Int>(N_("Group ID"), "Group Index")
       .supports_field()
       .description(
           N_("An index used to group values together for multiple separate accumulations"));
@@ -182,7 +182,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams &params)
         0);
 
     params.add_item(
-        IFACE_("Group Index"),
+        IFACE_("Group ID"),
         [type](LinkSearchOpParams &params) {
           bNode &node = params.add_node("GeometryNodeAccumulateField");
           node_storage(node).data_type = *type;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_face_set_boundaries.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_face_group_boundaries.cc
similarity index 82%
rename from source/blender/nodes/geometry/nodes/node_geo_mesh_face_set_boundaries.cc
rename to source/blender/nodes/geometry/nodes/node_geo_mesh_face_group_boundaries.cc
index aedd77b0653..a2befdb31b2 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_face_set_boundaries.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_face_group_boundaries.cc
@@ -7,11 +7,11 @@
 
 #include "node_geometry_util.hh"
 
-namespace blender::nodes::node_geo_mesh_face_set_boundaries_cc {
+namespace blender::nodes::node_geo_mesh_face_group_boundaries_cc {
 
 static void node_declare(NodeDeclarationBuilder &b)
 {
-  b.add_input<decl::Int>(N_("Face Set"))
+  b.add_input<decl::Int>(N_("Face Group ID"), "Face Set")
       .default_value(0)
       .hide_value()
       .supports_field()
@@ -19,7 +19,7 @@ static void node_declare(NodeDeclarationBuilder &b)
                       "same value are in the same region"));
   b.add_output<decl::Bool>(N_("Boundary Edges"))
       .field_source_reference_all()
-      .description(N_("The edges that lie on the boundaries between the different face sets"));
+      .description(N_("The edges that lie on the boundaries between the different face groups"));
 }
 
 class BoundaryFieldInput final : public bke::MeshFieldInput {
@@ -28,7 +28,7 @@ class BoundaryFieldInput final : public bke::MeshFieldInput {
 
  public:
   BoundaryFieldInput(const Field<int> face_set)
-      : bke::MeshFieldInput(CPPType::get<bool>(), "Boundary Field"), face_set_(face_set)
+      : bke::MeshFieldInput(CPPType::get<bool>(), "Face Group Boundaries"), face_set_(face_set)
   {
     category_ = Category::Generated;
   }
@@ -84,15 +84,16 @@ static void node_geo_exec(GeoNodeExecParams params)
   params.set_output("Boundary Edges", std::move(face_set_boundaries));
 }
 
-}  // namespace blender::nodes::node_geo_mesh_face_set_boundaries_cc
+}  // namespace blender::nodes::node_geo_mesh_face_group_boundaries_cc
 
-void register_node_type_geo_mesh_face_set_boundaries()
+void register_node_type_geo_mesh_face_group_boundaries()
 {
-  namespace file_ns = blender::nodes::node_geo_mesh_face_set_boundaries_cc;
+  namespace file_ns = blender::nodes::node_geo_mesh_face_group_boundaries_cc;
 
   static bNodeType ntype;
   geo_node_type_base(
-      &ntype, GEO_NODE_MESH_FACE_SET_BOUNDARIES, "Face Set Boundaries", NODE_CLASS_INPUT);
+      &ntype, GEO_NODE_MESH_FACE_GROUP_BOUNDARIES, "Face Group Boundaries", NODE_CLASS_INPUT);
+  node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
   ntype.declare = file_ns::node_declare;
   ntype.geometry_node_execute = file_ns::node_geo_exec;
   nodeRegisterType(&ntype);



More information about the Bf-blender-cvs mailing list