Fix #106235: Use consistent order for multi-input socket links #106320
File diff suppressed because it is too large
Load Diff
1656
build_files/build_environment/install_linux_packages.py
Executable file
1656
build_files/build_environment/install_linux_packages.py
Executable file
File diff suppressed because it is too large
Load Diff
@ -80,6 +80,11 @@ static const EnumPropertyItem prop_graphkeys_insertkey_types[] = {
|
||||
0,
|
||||
"Only Selected Channels",
|
||||
"Insert a keyframe on selected F-Curves using each curve's current value"},
|
||||
{GRAPHKEYS_INSERTKEY_ACTIVE,
|
||||
"ACTIVE",
|
||||
0,
|
||||
"Only Active F-Curve",
|
||||
"Insert a keyframe on the active F-Curve using the curve's current value"},
|
||||
{GRAPHKEYS_INSERTKEY_ACTIVE | GRAPHKEYS_INSERTKEY_CURSOR,
|
||||
"CURSOR_ACTIVE",
|
||||
0,
|
||||
|
@ -524,7 +524,7 @@ static void remove_links_to_unavailable_viewer_sockets(bNodeTree &btree, bNode &
|
||||
|
||||
static bNodeSocket *determine_socket_to_view(bNode &node_to_view)
|
||||
{
|
||||
int last_linked_socket_index = -1;
|
||||
int last_linked_data_socket_index = -1;
|
||||
bool has_linked_geometry_socket = false;
|
||||
for (bNodeSocket *socket : node_to_view.output_sockets()) {
|
||||
if (!socket_can_be_viewed(*socket)) {
|
||||
@ -541,12 +541,14 @@ static bNodeSocket *determine_socket_to_view(bNode &node_to_view)
|
||||
if (socket->type == SOCK_GEOMETRY) {
|
||||
has_linked_geometry_socket = true;
|
||||
}
|
||||
last_linked_socket_index = socket->index();
|
||||
else {
|
||||
last_linked_data_socket_index = socket->index();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (last_linked_socket_index == -1) {
|
||||
if (last_linked_data_socket_index == -1 && !has_linked_geometry_socket) {
|
||||
/* Return the first socket that can be viewed. */
|
||||
for (bNodeSocket *socket : node_to_view.output_sockets()) {
|
||||
if (socket_can_be_viewed(*socket)) {
|
||||
@ -559,7 +561,7 @@ static bNodeSocket *determine_socket_to_view(bNode &node_to_view)
|
||||
/* Pick the next socket to be linked to the viewer. */
|
||||
const int tot_outputs = node_to_view.output_sockets().size();
|
||||
for (const int offset : IndexRange(1, tot_outputs)) {
|
||||
const int index = (last_linked_socket_index + offset) % tot_outputs;
|
||||
const int index = (last_linked_data_socket_index + offset) % tot_outputs;
|
||||
bNodeSocket &output_socket = node_to_view.output_socket(index);
|
||||
if (!socket_can_be_viewed(output_socket)) {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user