Fix #112073: Add all group outputs first, followed by all inputs #112076

Merged
Lukas Tönne merged 1 commits from LukasTonne/blender:fix-interleaved-node-group-in-out into main 2023-09-07 15:08:59 +02:00

View File

@ -1022,6 +1022,7 @@ static void node_group_make_insert_selected(const bContext &C,
Map<int32_t, int32_t> node_identifier_map;
ntree.ensure_topology_cache();
/* Add all outputs first. */
for (bNode *node : nodes_to_move) {
for (bNodeSocket *output_socket : node->output_sockets()) {
for (bNodeLink *link : output_socket->directly_linked_links()) {
@ -1047,6 +1048,9 @@ static void node_group_make_insert_selected(const bContext &C,
}
}
}
}
/* Now add all inputs. */
for (bNode *node : nodes_to_move) {
for (bNodeSocket *input_socket : node->input_sockets()) {
for (bNodeLink *link : input_socket->directly_linked_links()) {
if (nodeLinkIsHidden(link)) {