Exposing Node Attribute Names for Scripting
If you want to make scripts that manipulate nodes in your scene, you will need to use the real names of the attributes for your nodes as understood by the Harmony scripting interface. For example, to refer to the position of a peg node on the (x) axis, you would need to refer to the real name of the corresponding attribute in your script, which is position.x.
You can easily obtain the real names of a node's attributes by exposing them in the Layer Properties dialog. To do this, you must enable Publish Attribute Mode. On top of allowing you to add certain attributes in a node to the list of attributes in its parent group's properties, Publish Attribute Mode also displays the name of each attribute as understood by the Harmony scripting interface.
- In the top-left corner of the Node view, open the View Menu and select View > Publish Attribute Mode.
- In the Node view, locate the node for which you want the list of scriptable attributes.
-
Click on the Layer Properties button for this node.
The Layer Properties dialog for this node appears. Right of each attribute is the option to publish them and to set their published name, and then the name of the attribute in the scripting interface: