Fix #106235: Use consistent order for multi-input socket links #106320
@ -684,7 +684,6 @@ class NodeTreeMainUpdater {
|
||||
link.tonode = &node;
|
||||
link.tosock = to_socket;
|
||||
link.flag |= NODE_LINK_VALID;
|
||||
link.multi_input_socket_index = 0;
|
||||
node.runtime->internal_links.append(link);
|
||||
}
|
||||
BKE_ntree_update_tag_node_internal_link(&ntree, &node);
|
||||
|
@ -1635,11 +1635,8 @@ static float2 socket_link_connection_location(const bNode &node,
|
||||
{
|
||||
const float2 socket_location = socket.runtime->location;
|
||||
if (socket.is_multi_input() && socket.is_input() && !(node.flag & NODE_HIDDEN)) {
|
||||
/* If link didn't connected to socket. In this case, at less this link have to be counted in
|
||||
* the list as single one. */
|
||||
const int total_inputs = math::max<int>(1, socket.runtime->total_inputs);
|
||||
return node_link_calculate_multi_input_position(
|
||||
socket_location, link.multi_input_socket_index, total_inputs);
|
||||
socket_location, link.multi_input_socket_index, socket.runtime->total_inputs);
|
||||
}
|
||||
return socket_location;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user