Fix: field inferencing fails when there are undefined nodes

This commit is contained in:
Jacques Lucke 2021-09-28 10:19:16 +02:00
parent def8fd6330
commit 7cd43a9d28
1 changed files with 6 additions and 0 deletions

View File

@ -4513,6 +4513,9 @@ static InputSocketFieldType get_interface_input_field_type(const NodeRef &node,
/* Outputs always support fields when the data type is correct. */
return InputSocketFieldType::IsSupported;
}
if (node.is_undefined()) {
return InputSocketFieldType::None;
}
const NodeDeclaration *node_decl = node.declaration();
@ -4547,6 +4550,9 @@ static OutputFieldDependency get_interface_output_field_dependency(const NodeRef
/* Input nodes get special treatment in #determine_group_input_states. */
return OutputFieldDependency::ForDependentField();
}
if (node.is_undefined()) {
return OutputFieldDependency::ForDataSource();
}
const NodeDeclaration *node_decl = node.declaration();