Script Editor View

The Scripting view allows you to edit scripts to run in Harmony directly from the application. It displays a list of available scripts, from which you can select an existing script, edit it, test it and save it. The Script Editor will highlight the syntax of your script for easy reading.

NOTE To learn more about scripting in Harmony, see About Scripting

Script Editor View

Parameter Description
Script Editor menu The menu for this view—see Script Editor View Menu.
Script Editor toolbar The toolbar for this view—see Script Editor Toolbar.

Script list

The list of script files available as well as their location. Selecting a script will open it in the editor.

The location of the script can be one of the following:

  • Application Folder: Scripts that are packaged and installed with Harmony. By default, you cannot edit these scripts until you select them and click on Make Editable, at which point you are prompted to copy the script to either the User folder or the Scene folder.

    Scripts in the Application Resources folder are in the following location:

    • Windows: C:\Program Files (x86)\Toon Boom Animation\Toon Boom Harmony 16.0 Premium\resources\scripts
    • macOS (Stand Alone): /Applications/Toon Boom Harmony 16.0 Premium/tba/resources/scripts
    • macOS (Server): /Applications/Toon Boom Harmony 16.0 Premium Network/tba/resources/scripts
    • GNU/Linux: /usr/local/ToonBoomAnimation/harmonyPremium_16.0/resources/scripts
  • User: Scripts that are saved in your user preferences. Those scripts can be edited and executed from any scene, provided that you are logged in as the same user.

    In Harmony Stand Alone, scripts in the User folder are in the following location:

      Windows: C:\Users\[user_name]\AppData\Roaming\Toon Boom Animation\Toon BoomHarmonyPremium\1600-scripts
    • macOS/Users/[user_name]/Library/Preferences/Toon Boom Animation/Toon BoomHarmonyPremium/1600-scripts
    • GNU/Linux: /home/[user_name]/Toon Boom Animation/Toon BoomHarmonyPremium/1600-scripts

    In Harmony Server, scripts in the User folder are in the following location:

    /USA_DB/users/[username]/HarmonyPremium/1600-scripts

  • Scene: Scripts in the scripts sub-folder of the currently open scene. These scripts can only be edited and executed when the current scene is open.

  • Job: When using Harmony Server, these are the scripts saved in the directory of the current scene's jon. These scripts can be edited and executed by any user when any scene that is part of this job is open.

    Scripts in the Job folder can be found in the following location:

    /USA_DB/jobs/[job name]

  • Environment: When using Harmony Server, these are scripts saved in the directory of the current scene's environment. These scripts can be edited and executed by any user when any scene that is part of this environment is open.

    Scripts in the Environment folder can be found in the following location:

    /USA_DB/environments/[environment name]

  • Global (Harmony Server only): Scripts in the Harmony database's scripts directory. These scripts can be edited by any user when any scene in the database is open.
  • System Variable: Scripts inside the directory set in the TOONBOOM_GLOBAL_SCRIPT_LOCATION environment variable, if this variable is set. These scripts can be edited and executed by anyone on your workstation, unless they are read-only, in which case they can only be executed.
NOTE

When two or more scripts with the same file name exist in different locations, Harmony will give priority to a single one of these scripts. The script given priority will be the one listed in the Script Editor and the one executed if it is associated to a toolbar button.

Which script is prioritized is determined by the order of priority of script locations. From highest priority to lowest priority, the order goes as follows:

User > Scene > System Variable > Job > Environment > Global

NOTE The << Sandbox >> item at the top of the list does not correspond to an actual script file. It is a temporary container to type and test code, and its content cannot be saved.

Editor

A text field in which you can edit the selected script.

NOTE If the selected script is in the Application Resources folder, you will not be able to edit it until you click on the Make Editable button.

Search toolbar

Allows you to type in a keyword and search for this keyword within the script. You can use the Next button to go to the next instance of the keyword and the Previous button to go to the previous instance.

Cancel If you have made any changes to your script that you have not yet saved, this discards those changes and reloads the saved version.
Restore to Default

If the current script is a script that was packaged with Harmony, and which you copied to your User folder or to the Scene folder to make changes to it, you can click on this button to delete the User or Scene copy of this script and resume using the original version of the script instead.

IMPORTANT This will permanently delete your version of the script and any changes you have made to it.

Verify

Verifies that the script has no syntax error.

Make Editable

If the currently selected script is in the Application Resources folder, you cannot edit it. By clicking on this button, the script can be copied to a location where you can edit it.

When you click on this button, you are prompted to choose whether to copy the script in the User folder or in the Scene folder:

  • Copying the script to the User folder means it is copied to your user preferences. This means your version of the script will be accessible in any scene, as long as you are logged in as the same user.
  • Copying the script to the Scene folder means copying it to the scene's scripts sub-folder. Your version of the script will only be accessible when working on this scene.
NOTE This button will be greyed out if the script is in the System Variable directory and is read-only.

Save

Saves the modifications you made to the script.

This button replaces the Make Editable button after you have used the Make Editable button to copy the script to a location from which you can edit it.