-
Notifications
You must be signed in to change notification settings - Fork 8
star_inputs
chrisgoringe edited this page Sep 29, 2023
·
2 revisions
An optional input (but not a required one) can be specified with type '*'
@classmethod
def INPUT_TYPES(s):
return { "required" : {}, "optional" : { 'anything' : ( "*", {} ) } }
def my_func(self, anything=None):
# anything will be passed if the node is connected
If you do this with a required node, you'll get a validation error.
You can connect any output to an optional * node, but they don't play nicely with primitives or reroutes.