Skip to content

star_inputs

chrisgoringe edited this page Sep 29, 2023 · 2 revisions

Inputs that take anything

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.

Clone this wiki locally