Python - Set Data Type of Inputs (Not Type Hint)

Ah yes, I missed the setting of the data part, my bad. I think you need to fiddle with the parameter volatile data. This is for outputs, but have a look:

That said, when I need a default input value I just check if the parameter variable is None (for item data) and then set the variable to the default value within the script (i.e. before running any code as part of the input checks). And then document this in the parameter docstring so the user knows what’s going on.

Edit: Jesus, sorry again. I understand now. And yes I think a compiled component is probably the way to go. Though I suspect one could do it when running a GHPython component in SDK mode.

1 Like