Skip to content

Commit

Permalink
add poll to node.sv_quicklink_new_node_input (#3977)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeffii committed Mar 18, 2021
1 parent 9533f25 commit 513dd84
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/sockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,10 @@ class SvLinkNewNodeInput(bpy.types.Operator):
bl_idname = "node.sv_quicklink_new_node_input"
bl_label = "Add a new node to the left"

@classmethod
def poll(cls, context):
return hasattr(context, 'socket')

def execute(self, context):
tree, node, socket = context.node.id_data, context.node, context.socket

Expand Down

0 comments on commit 513dd84

Please sign in to comment.