Fix: incorrect socket shape for noise texture input

This commit is contained in:
Jacques Lucke 2021-09-24 10:30:13 +02:00
parent f8a0e102cf
commit 7ca48a3814
1 changed files with 7 additions and 3 deletions

View File

@ -4519,13 +4519,17 @@ static InputSocketFieldType get_interface_input_field_type(const NodeRef &node,
/* Node declarations should be implemented for nodes involved here. */
BLI_assert(node_decl != nullptr);
/* Get the field type from the declaration. */
const SocketDeclaration &socket_decl = *node_decl->inputs()[socket.index()];
const InputSocketFieldType field_type = socket_decl.input_field_type();
if (field_type == InputSocketFieldType::Implicit) {
return field_type;
}
if (node_decl->is_function_node()) {
/* In a function node, every socket supports fields. */
return InputSocketFieldType::IsSupported;
}
/* Get the field type from the declaration. */
const SocketDeclaration &socket_decl = *node_decl->inputs()[socket.index()];
return socket_decl.input_field_type();
return field_type;
}
static OutputFieldDependency get_interface_output_field_dependency(const NodeRef &node,