Fix: geometry nodes viewer shows black with dangling reroute input

Differential Revision: https://developer.blender.org/D16322
This commit is contained in:
Iliya Katueshenock 2022-11-12 14:18:29 +01:00 committed by Jacques Lucke
parent a582abd923
commit fc544bc974
1 changed files with 2 additions and 1 deletions

View File

@ -527,7 +527,8 @@ class LazyFunctionForViewerNode : public LazyFunction {
debug_name_ = "Viewer";
Vector<const bNodeSocket *> dummy_used_outputs;
lazy_function_interface_from_node(bnode, r_used_inputs, dummy_used_outputs, inputs_, outputs_);
if (!r_used_inputs[1]->is_directly_linked()) {
const Span<const bNodeLink *> links = r_used_inputs[1]->directly_linked_links();
if (links.is_empty() || nodeIsDanglingReroute(&bnode.owner_tree(), links.first()->fromnode)) {
use_field_input_ = false;
r_used_inputs.pop_last();
inputs_.pop_last();