Geometry Nodes: Rename bounding box mesh output to "Bounding Box"
This was decided by the geometry nodes team, because the important part of this output is not that it's a mesh.
This commit is contained in:
@@ -159,6 +159,33 @@ static void version_switch_node_input_prefix(Main *bmain)
|
||||
FOREACH_NODETREE_END;
|
||||
}
|
||||
|
||||
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_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
||||
{
|
||||
@@ -211,5 +238,11 @@ void blo_do_versions_300(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_BOUNDING_BOX, "Mesh", "Bounding Box");
|
||||
}
|
||||
}
|
||||
FOREACH_NODETREE_END;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user