Geometry Nodes: Rename boolean input sockets
"Geometry A" becomes "Geometry 1", just to be more consistent with other nodes.
This commit is contained in:
parent
2771dfd563
commit
80578a9d54
|
@ -708,6 +708,33 @@ static void do_versions_strip_cache_settings_recursive(const ListBase *seqbase)
|
|||
}
|
||||
}
|
||||
|
||||
static void version_node_socket_name(bNodeTree *ntree,
|
||||
const int node_type,
|
||||
const char *old_name,
|
||||
const char *new_name)
|
||||
{
|
||||
LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
|
||||
if (node->type == node_type) {
|
||||
LISTBASE_FOREACH (bNodeSocket *, socket, &node->inputs) {
|
||||
if (STREQ(socket->name, old_name)) {
|
||||
strcpy(socket->name, new_name);
|
||||
}
|
||||
if (STREQ(socket->identifier, old_name)) {
|
||||
strcpy(socket->identifier, new_name);
|
||||
}
|
||||
}
|
||||
LISTBASE_FOREACH (bNodeSocket *, socket, &node->outputs) {
|
||||
if (STREQ(socket->name, old_name)) {
|
||||
strcpy(socket->name, new_name);
|
||||
}
|
||||
if (STREQ(socket->identifier, old_name)) {
|
||||
strcpy(socket->identifier, new_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* NOLINTNEXTLINE: readability-function-size */
|
||||
void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
||||
{
|
||||
|
@ -1545,5 +1572,13 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
|||
*/
|
||||
{
|
||||
/* Keep this block, even when empty. */
|
||||
|
||||
FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
|
||||
if (ntree->type == NTREE_GEOMETRY) {
|
||||
version_node_socket_name(ntree, GEO_NODE_BOOLEAN, "Geometry A", "Geometry 1");
|
||||
version_node_socket_name(ntree, GEO_NODE_BOOLEAN, "Geometry B", "Geometry 2");
|
||||
}
|
||||
FOREACH_NODETREE_END;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
#include "node_geometry_util.hh"
|
||||
|
||||
static bNodeSocketTemplate geo_node_boolean_in[] = {
|
||||
{SOCK_GEOMETRY, N_("Geometry A")},
|
||||
{SOCK_GEOMETRY, N_("Geometry B")},
|
||||
{SOCK_GEOMETRY, N_("Geometry 1")},
|
||||
{SOCK_GEOMETRY, N_("Geometry 2")},
|
||||
{-1, ""},
|
||||
};
|
||||
|
||||
|
@ -105,8 +105,8 @@ static Mesh *mesh_boolean_calc(const Mesh *mesh_a, const Mesh *mesh_b, int boole
|
|||
namespace blender::nodes {
|
||||
static void geo_node_boolean_exec(GeoNodeExecParams params)
|
||||
{
|
||||
GeometrySet geometry_set_in_a = params.extract_input<GeometrySet>("Geometry A");
|
||||
GeometrySet geometry_set_in_b = params.extract_input<GeometrySet>("Geometry B");
|
||||
GeometrySet geometry_set_in_a = params.extract_input<GeometrySet>("Geometry 1");
|
||||
GeometrySet geometry_set_in_b = params.extract_input<GeometrySet>("Geometry 2");
|
||||
GeometrySet geometry_set_out;
|
||||
|
||||
GeometryNodeBooleanOperation operation = (GeometryNodeBooleanOperation)params.node().custom1;
|
||||
|
|
Loading…
Reference in New Issue