Fix T38142: socket interface 'type' enums are not initialized. These are
not really needed anyway, but need to be adjusted to make use of the socket value copy methods.
This commit is contained in:
parent
ee15db9db5
commit
10b5ad5bae
Notes:
blender-bot
2023-02-14 11:21:43 +01:00
Referenced by issue #38142, Node Group defaults not working
|
@ -334,6 +334,10 @@ static void standard_node_socket_interface_init_socket(bNodeTree *UNUSED(ntree),
|
|||
/* initialize the type value */
|
||||
sock->type = sock->typeinfo->type;
|
||||
|
||||
/* XXX socket interface 'type' value is not used really,
|
||||
* but has to match or the copy function will bail out
|
||||
*/
|
||||
stemp->type = stemp->typeinfo->type;
|
||||
/* copy default_value settings */
|
||||
node_socket_copy_default_value(sock, stemp);
|
||||
}
|
||||
|
@ -342,7 +346,7 @@ static void standard_node_socket_interface_init_socket(bNodeTree *UNUSED(ntree),
|
|||
static void standard_node_socket_interface_verify_socket(bNodeTree *UNUSED(ntree), bNodeSocket *stemp, bNode *UNUSED(node), bNodeSocket *sock, const char *UNUSED(data_path))
|
||||
{
|
||||
/* sanity check */
|
||||
if (!STREQ(sock->idname, stemp->idname))
|
||||
if (sock->type != stemp->typeinfo->type)
|
||||
return;
|
||||
|
||||
/* make sure both exist */
|
||||
|
@ -381,6 +385,7 @@ static void standard_node_socket_interface_verify_socket(bNodeTree *UNUSED(ntree
|
|||
static void standard_node_socket_interface_from_socket(bNodeTree *UNUSED(ntree), bNodeSocket *stemp, bNode *UNUSED(node), bNodeSocket *sock)
|
||||
{
|
||||
/* initialize settings */
|
||||
stemp->type = stemp->typeinfo->type;
|
||||
node_socket_copy_default_value(stemp, sock);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue