Fix #134111: sockets are incorrectly grayed out after random node

The issue was that the code did not handle input sockets that are fields
implicitly correctly. It just retrieved a single from them, instead of
treating them as having an unknown value.
This commit is contained in:
Jacques Lucke
2025-02-05 14:09:48 +01:00
parent d2db9927ed
commit 4fd236dc32

View File

@@ -6,6 +6,7 @@
#include "NOD_geometry_nodes_execute.hh"
#include "NOD_multi_function.hh"
#include "NOD_node_declaration.hh"
#include "NOD_node_in_compute_context.hh"
#include "NOD_socket_usage_inference.hh"
@@ -764,6 +765,13 @@ struct SocketUsageInferencer {
all_socket_values_.add_new(socket, nullptr);
return;
}
if (const SocketDeclaration *socket_decl = socket.socket->runtime->declaration) {
if (socket_decl->input_field_type == InputSocketFieldType::Implicit) {
/* Implicit fields inputs don't have a single static value. */
all_socket_values_.add_new(socket, nullptr);
return;
}
}
const CPPType &base_type = *socket->typeinfo->base_cpp_type;
void *value_buffer = scope_.linear_allocator().allocate(base_type.size(),