Fix #121110: Allow changing type of reroute node sockets
Simple fix to avoid regression of reroute sockets in a custom nodes system. Proper solution will be in 4.3: #121146. Pull Request: https://projects.blender.org/blender/blender/pulls/124244
This commit is contained in:
parent
e9d46b52df
commit
a2a5532818
@ -271,8 +271,12 @@ static void rna_NodeSocket_type_set(PointerRNA *ptr, int value)
|
||||
blender::bke::nodeFindNode(ntree, sock, &node, nullptr);
|
||||
if (node->type != NODE_CUSTOM) {
|
||||
/* Can't change the socket type on built-in nodes like this. */
|
||||
if (!node->is_reroute()) {
|
||||
/* TODO: Refactor reroute node to avoid direct change of the socket type in built-in node and
|
||||
* use proper node method for this. */
|
||||
return;
|
||||
}
|
||||
}
|
||||
blender::bke::nodeModifySocketTypeStatic(ntree, node, sock, value, 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user