From 1663530408fd0a9f3870289c225acedf24e014d9 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Tue, 23 Aug 2022 12:40:26 +0200 Subject: Fix T100318: handle custom nodes in field inferencing more gracefully Custom nodes are not supported, but it shouldn't crash here. --- source/blender/blenkernel/intern/node_tree_update.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/node_tree_update.cc b/source/blender/blenkernel/intern/node_tree_update.cc index 5eb962337fa..58084226b00 100644 --- a/source/blender/blenkernel/intern/node_tree_update.cc +++ b/source/blender/blenkernel/intern/node_tree_update.cc @@ -94,6 +94,9 @@ static InputSocketFieldType get_interface_input_field_type(const NodeRef &node, if (node.is_undefined()) { return InputSocketFieldType::None; } + if (node.bnode()->type == NODE_CUSTOM) { + return InputSocketFieldType::None; + } const NodeDeclaration *node_decl = node.declaration(); @@ -131,6 +134,9 @@ static OutputFieldDependency get_interface_output_field_dependency(const NodeRef if (node.is_undefined()) { return OutputFieldDependency::ForDataSource(); } + if (node.bnode()->type == NODE_CUSTOM) { + return OutputFieldDependency::ForDataSource(); + } const NodeDeclaration *node_decl = node.declaration(); -- cgit v1.2.3