Tooltip for default value in Python script component?

Is there any way to have the Python component show a “locally defined value” like the native components do?

image

Right now I define default values in the script by checking the inputs for None (nothing connected) and assigning a default value if this is the case, but the only way I know currently to indicate that default value to the user is in the docstring…

image

If you don’t want to create a compiled version of your plugin, a workaround could be setting the default value in grasshopper instead of python.

Besides, docstring you can access and edit parameters descriptions and others attributes (but not default value) like this:

ghenv.Component.Params.Input[0].Description = "Number of iterations"

2 Likes

Thanks! Nice to know. I had also not considered entering a default value in the Data Item field.

1 Like