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:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user