Fix T100318: handle custom nodes in field inferencing more gracefully

Custom nodes are not supported, but it shouldn't crash here.
This commit is contained in:
Jacques Lucke 2022-08-23 12:40:26 +02:00
parent 95464a842c
commit 1663530408
Notes: blender-bot 2023-09-13 08:48:34 +02:00
Referenced by issue #100318, Adding custom GeometryNode (and adding inputs or outputs) crash
1 changed files with 6 additions and 0 deletions

View File

@ -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();