Fix #147600: warning pass-through hinders usage inference

The warning node just was not handled in the value inferencer yet.
This commit is contained in:
Jacques Lucke
2025-10-08 10:08:08 +02:00
parent aef8a05701
commit a589cb5cf3

View File

@@ -188,6 +188,10 @@ class SocketValueInferencerImpl {
this->value_task__output__boolean_math(socket);
return;
}
case GEO_NODE_WARNING: {
this->value_task__output__warning(socket);
return;
}
default: {
if (node->is_type("NodeEnableOutput")) {
this->value_task__output__enable_output(socket);
@@ -492,6 +496,18 @@ class SocketValueInferencerImpl {
}
}
void value_task__output__warning(const SocketInContext &socket)
{
const NodeInContext node = socket.owner_node();
const SocketInContext show_input_socket = node.input_socket(0);
const std::optional<InferenceValue> value = all_socket_values_.lookup_try(show_input_socket);
if (!value.has_value()) {
this->push_value_task(show_input_socket);
return;
}
all_socket_values_.add_new(socket, *value);
}
void value_task__output__enable_output(const SocketInContext &socket)
{
const NodeInContext node = socket.owner_node();