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