-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wish - to allow optional inputs in custom nodes #1765
Comments
I can see why you would want this behavior on custom nodes with many inputs, and defining the behavior inside the node with something like an input node seems to make sense. A work around is to pass a default token like "default" and then like you noted, internally handle that to select a default value. But you still need to input this token to all inputs. |
Thought I heard this before somewhere, quite some time ago: #267 |
Default values are now available in |
Some default nodes have optional inputs. For example, in PolyCurve.ByPoints Dynamo assumes correctly that normally I am not using it for closed profiles. So I am not having to connect a true/false node to "ConnectLasttoFirst" every time I am using it. "ConnectLasttoFirst" is an optional input with a default value of "false".
Sadly it seems not possible to make custom nodes with this smart behavior. All the inputs must be filled. Even if the internal logic of the custom node is taking care of what to do if some are not.
Maybe a possibility would be the option of setting a default value in the "input" nodes when defining a custom node. If nothing connected to the default value, that input must be filled necessarily when using the custom node. If something is connected to the default value, the input becomes optional.
The text was updated successfully, but these errors were encountered: