Dynamic ports are opt-in, and a node that does not opt in has none
Dynamic ports let an author add parameters and outputs to one node instance beyond what its processor declares. Nothing gets them by accident: a node type has to ask for them, and the definitions start empty.
The rule
- A node type opts a node in to dynamic ports by declaring two reserved parameters:
dynamicParameters, holding the node's dynamic parameter definitions, anddynamicOutputs, holding its dynamic output port definitions. - Each of the two MUST be an array.
- The default of each MUST be the empty array.
- A node that has not opted in MUST NOT have dynamic ports.
- A dynamic parameter that is connectable is a dynamic input; one that is configurable is a dynamic setting; it can be both.
What it means
Opting in adds two keys to a node type's declared parameters, each holding an array of port definitions with an empty default. A node type that never opts in never carries those keys, so a node built from it cannot have a dynamic port at all — there is nothing to add one to.
What a stored definition looks like when it is not usable matters as much as what it looks like when correctly authored: a value that is not an array at all reads back as an empty array rather than surfacing the malformed content or refusing the node outright.
Example
A node's stored definitions are not lists — one is a string, one a number:
{ "dynamicParameters": "not-an-array", "dynamicOutputs": 42 }[[], []]