Script Node

You can use the script node to create a custom node that processes peg and image information from other nodes using the Harmony scripting interface.

Connection

By default, the Script node has one image input port and one image output port, which do not have any purpose until you add scripts to it.

The Script node can be configured to have as many input and output ports as needed. Each port can be configured to carry image information or transformation (peg) information.

Scripting Interface

For a reference on the modules and methods available in the scripting interface used by the Script node, refer to the Script Node Reference.

Layer Properties

The layer properties of a Script Node allow you to configure which properties and ports it has, to set values for the properties you added to it, to link it to files and to script its behaviour in various events.

Parameter Description
Name The name of the node as it appears in the Node View and the Timeline view. Each node must have a name that is unique to its containing group.
Tabs

Attributes

This tab allows you to set values for the attributes defined in the Specifications tab.
Specifications

This tab allows you to define the attributes as well as the input and output ports for the Script node.

The Script node supports the following types of attributes:

  • bool
  • int
  • double
  • String
  • Text
  • Colour
  • Position2d
  • Position3d

The Script node supports the following types of ports:

  • Image
  • Peg
Softrender

This tab allows you to write or link to a script that will be executed when rendering the node.

Initialization

This tab allows you to write or link to a script that will be executed when loading the scene.

Cleanup

This tab allows you to write or link to a script that will be executed when closing the scene.

UI Script This tab allows you to write or link to a script that will be executed when using the Show Control command while the node is selected.
Extra Files

This tab allows you to define folders or files from root directory of the scene that should be preserved when creating templates or saving the scene in a different location. Any asset, such as external scripts, user interface files, data files or images that the Script node requires should be listed in this tab.

NOTES
  • To add Extra Files to the Extra Files attribute, click on the Function button right of the Extra Files field to create the Extra Files attribute, then click on it again to open a dialog box in which you can type the file path of each file or folder that you want to copy with the Master Controller, with one file path per line.
  • File paths must use forward slashes (/) and must be relative to the scene directory. They can point to files or folders. For example, if you want to copy everything in the scripts sub-directory of your scene with your Master Controller, you can simply add scripts to the list.