Fix #116477: Node group sockets with subtypes have broken idnames #117133

Merged
Lukas Tönne merged 7 commits from LukasTonne/blender:fix-node-socket-subtype-idnames into main 2024-01-16 15:32:43 +01:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 56bfc71f02 - Show all commits

View File

@ -503,7 +503,7 @@ static bNodeSocket *make_socket(bNodeTree *ntree,
}
/* Include the subtype suffix for old socket idnames. */
static StringRef get_socket_subtype_idname(StringRef idname, const void *socket_data)
static StringRef get_legacy_socket_subtype_idname(StringRef idname, const void *socket_data)
LukasTonne marked this conversation as resolved Outdated

Can you put legacy in this function name?

So it's clear this does not have to be kept up to date or get used by new code.

Can you put `legacy` in this function name? So it's clear this does not have to be kept up to date or get used by new code.
{
if (idname == "NodeSocketFloat") {
const bNodeSocketValueFloat &float_data = *static_cast<const bNodeSocketValueFloat *>(
@ -572,7 +572,7 @@ static void construct_interface_as_legacy_sockets(bNodeTree *ntree)
bNodeSocket *iosock = make_socket(
ntree,
in_out,
get_socket_subtype_idname(socket.socket_type, socket.socket_data),
get_legacy_socket_subtype_idname(socket.socket_type, socket.socket_data),
socket.name ? socket.name : "",
socket.identifier);
if (!iosock) {