Commit: 93887d10961a65843f8e70d7d4f5a1b64aba46b5
Author: Jacques Lucke
Date:   Mon Oct 19 12:28:44 2020 +0200
Branches: master
https://developer.blender.org/rB93887d10961a65843f8e70d7d4f5a1b64aba46b5

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

===================================================================

M       release/scripts/startup/bl_ui/space_node.py

===================================================================

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'

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to