Fix T93920: Wrong field inferencing state with unavailable socket

This commit ignores unavailable sockets in one more place, to fix the
case in T93920.

Differential Revision: https://developer.blender.org/D13562
This commit is contained in:
Hans Goudey 2021-12-14 08:30:45 -06:00
parent b5c18288f5
commit b44a500988
Notes: blender-bot 2023-06-12 00:52:52 +02:00
Referenced by issue #93920, Geometry nodes. Socket state stucks in single value state
1 changed files with 3 additions and 1 deletions

View File

@ -4748,7 +4748,9 @@ static void propagate_data_requirements_from_right_to_left(
/* The output is required to be a single value when it is connected to any input that does
* not support fields. */
for (const InputSocketRef *target_socket : output_socket->directly_linked_sockets()) {
state.requires_single |= field_state_by_socket_id[target_socket->id()].requires_single;
if (target_socket->is_available()) {
state.requires_single |= field_state_by_socket_id[target_socket->id()].requires_single;
}
}
if (state.requires_single) {