Harmony Scripting Resources

Activity 1: Creating a Simple Script

45 mins Advanced


In this topic, you will see how to write a simple script for Harmony. From this point forward, you will be then be able to explore and practice scripting in Harmony. Once you feel ready and comfortable working with the Toon Boom scripting API, you can move on to the next module about Master Controllers.

To create your scripts, you can either use your favourite external scripting editor or use the Script Editor window in Harmony. Make sure to also keep handy the Toon Boom API scripting resources.

NOTE: To find most parameters to use in your script, you can refer to a Harmony project *.xstage file. When opening the file in a text or script editor, you can see all layers, nodes, values, and parameters used in the project. When looking for a specific value, you can add a layer or node in your project, set the parameter in the UI and save the project. Following the save operation, you can then open the *.xstage file in your text editor and look at all the provided values.

In this exercise, you will learn to write a script to create 4 drawing layers and connected them to an existing Composite node. This will require you to access the selection information, get the position of the selected instance, add new nodes, find the string matching the node type, and link nodes.


To complete this topic, you will need the following from the sample material you downloaded:

  • MO-HSCP-001/Create_Drawing_Nodes.js
  • MO-HSCP-001/Create_Drawing_Nodes-Composite-Validation.js


You must be logged in to take the Quiz

Sign Up     Sign In