Scripting in Harmony

Hi,

I would like to know how to write scripts for Harmony. I am an animator, so my programming experience is very simple. I have never used QT before.

I tried using the scripting references included with Toon Boom, but I am unable to do anything. I am not sure exactly what does what, and how to do it?

Do I need to start learning something before learning scripting in Harmony? If yes, what exactly do I need to learn? If no, what exactly am I doing wrong, because I am unable to get anything to happen with scripting?

Mainly I need to automate some things, such as exporting multiple layers, each to its own file, instead of having to do that manually. These are the kind of things I am willing to achieve with scripting.

Thank you very much.

Hi,

We already have a script that can allow you to export the layers into their own files.
The script is already in the software and he’s called TB_ExportWithMarker.

To use it you need to mark the frames by putting a letter in a specific column in the Xsheet. This column has to be called “EM”.
To add the column you can go to Scene > Add > Export Marker Column.

Then put one of those letters in the column:

“W”: This will export a flat image with a white background.
“T”: This will export a flat image with a transparent background.
“L”: This will export one image per column/layers. All images will have a transparent background.

You might want to modify the script but if you do that you will need to understand how scripting work and how javascript is written.

Hi Alexis,
Can you point to a good source to learn scripting in Harmony?

Scripting in Harmony is scripting in Javascript with our owns api.

So You may want to look at find how to script in javascript on any courses you might find on internet.
I actually like this one : https://www.codecademy.com/learn/javascript

Then you’ll need to see our functions and classes.
http://docs.toonboom.com/help/harmony-12/scripting/script/annotated.html