Fix #106235: Use consistent order for multi-input socket links #106320
@ -667,6 +667,9 @@ class NodeTreeMainUpdater {
|
||||
link.tonode = &node;
|
||||
link.tosock = to_socket;
|
||||
link.flag |= NODE_LINK_VALID;
|
||||
/* Drawing of internal link for multi-input socket have to starting at last index of set of
|
||||
* random number of connection. */
|
||||
link.multi_input_socket_index = -1;
|
||||
node.runtime->internal_links.append(link);
|
||||
}
|
||||
BKE_ntree_update_tag_node_internal_link(&ntree, &node);
|
||||
|
@ -112,6 +112,9 @@ float2 node_link_calculate_multi_input_position(const float2 &socket_position,
|
||||
{
|
||||
const float offset = (total_inputs * NODE_MULTI_INPUT_LINK_GAP - NODE_MULTI_INPUT_LINK_GAP) *
|
||||
0.5f;
|
||||
if (index == -1) {
|
||||
return {socket_position.x, socket_position.y + offset};
|
||||
}
|
||||
return {socket_position.x, socket_position.y - offset + index * NODE_MULTI_INPUT_LINK_GAP};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user