diff options
author | Leon Schittek <leon.schittek@gmx.net> | 2022-04-18 23:28:03 +0300 |
---|---|---|
committer | Leon Schittek <leon.schittek@gmx.net> | 2022-04-18 23:28:03 +0300 |
commit | 03d39a04a3a29b7eb464ca2ae39c69757ee9f6c2 (patch) | |
tree | 739c4608eda314fa8ac03b5fa2f94eccd2c9bfc5 /source/blender/editors/space_node/node_edit.cc | |
parent | 314b27850ccb6d103cf5c73855187cfc11ec48d8 (diff) |
Fix T97002: Preserve multi socket link order
Preserve multi socket link order when copying nodes or adding a new
group input sockets by linking directly to multi inputs from the group
input node's extension socket.
This is done by also copying the `multi_input_socket_index` when
the new links are created by copying existing or temporary links.
Reviewed By: Hans Goudey
Differential Revision: http://developer.blender.org/D14535
Diffstat (limited to 'source/blender/editors/space_node/node_edit.cc')
-rw-r--r-- | source/blender/editors/space_node/node_edit.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/node_edit.cc b/source/blender/editors/space_node/node_edit.cc index 9d83f977fe0..2d7972e2291 100644 --- a/source/blender/editors/space_node/node_edit.cc +++ b/source/blender/editors/space_node/node_edit.cc @@ -1306,6 +1306,11 @@ static int node_duplicate_exec(bContext *C, wmOperator *op) newlink->flag = link->flag; newlink->tonode = node_map.lookup(link->tonode); newlink->tosock = socket_map.lookup(link->tosock); + + if (link->tosock->flag & SOCK_MULTI_INPUT) { + newlink->multi_input_socket_index = link->multi_input_socket_index; + } + if (link->fromnode && (link->fromnode->flag & NODE_SELECT)) { newlink->fromnode = node_map.lookup(link->fromnode); newlink->fromsock = socket_map.lookup(link->fromsock); |