From 93887d10961a65843f8e70d7d4f5a1b64aba46b5 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 19 Oct 2020 12:28:44 +0200 Subject: Fix: skip drawing input sockets that do not have a draw method Contributed by @povmaniaco with minor changes by me. Differential Revision: https://developer.blender.org/D9263 --- release/scripts/startup/bl_ui/space_node.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 4662de8b4ac..c0c38c02c63 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -537,7 +537,7 @@ class NODE_PT_active_node_properties(Panel): # XXX this could be filtered further to exclude socket types # which don't have meaningful input values (e.g. cycles shader) - value_inputs = [socket for socket in node.inputs if socket.enabled and not socket.is_linked] + value_inputs = [socket for socket in node.inputs if self.show_socket_input(socket)] if value_inputs: layout.separator() layout.label(text="Inputs:") @@ -550,6 +550,9 @@ class NODE_PT_active_node_properties(Panel): iface_(socket.label if socket.label else socket.name, socket.bl_rna.translation_context), ) + def show_socket_input(self, socket): + return hasattr(socket, 'draw') and socket.enabled and not socket.is_linked + class NODE_PT_texture_mapping(Panel): bl_space_type = 'NODE_EDITOR' -- cgit v1.2.3