diff options
author | Jacques Lucke <jacques@blender.org> | 2021-09-28 11:19:16 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-09-28 11:19:16 +0300 |
commit | 7cd43a9d2887cffa8b2c24aa0d51f1e87a70e701 (patch) | |
tree | 56c42f81fa43638aada5468dc0aab57ce753863b /source | |
parent | def8fd6330fde5a7add9ab89efb6c08576355eb2 (diff) |
Fix: field inferencing fails when there are undefined nodes
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/node.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index f1f643ffed7..f2843e5f88e 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -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(); |