Fix #106235: Use consistent order for multi-input socket links #106320

Closed
Iliya Katushenock wants to merge 17 commits from mod_moder:fix_internal_link_drawing into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 1 additions and 5 deletions
Showing only changes of commit 6cfe9fc444 - Show all commits

View File

@ -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);

View File

@ -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;
}