When creating custom nodes that are based on the Transform node, you may want to parameterize your node so that values can be configured from an input property of the node rather than editing the underlying Python code used by the Transform node.
Here is an example that defines a number of properties on a Composite node that are then used by the child Transform node and its Python code. In this case default values are defined for the properties. Alternatively, if you did not want to define a default value for a property, the code could be modified to not specify a default and the node will generate an error. See the Node API documentation for further details.
The example shows how you can obtain an integer value from a property, obtain a string value and provide the user with a choice of (string) values. The node outputs the value of these properties (or their defaults). If a selection is made for the Choice property, the node also outputs the value of the selected field in a new output field.
Please sign in to leave a comment.