Expression Tutorial

My last script is used to recalculate the expressions values, so I thought it would be useful to show how to use expressions in your rig, and how to make a switch to turn it on and off.

Video quality was good before uploading to Youtube… but it’s still ok.

  • You don’t need to use the recalculate expression script. Read this: About Expressions.

Advertisements

Move Selected

If you use Flash, you know it has a very useful feature called ‘Edit Multiple Frames’. Then you find out Toon Boom Harmony 10.3 doesn’t have anything similar.  Why?? But this script tries to replicate that feature. It is not perfect, but it’s better than nothing.

First of all copy the ‘moveSelected.ui’ and ‘moveSelected.js’ to your scripts folder. Then copy all the png files to the default icons folder. If you’re working in Toon Boom connected to a database you’ll probably have to change the path for the ‘moveSelected.ui’ file that’s writen in the script, if you’re working offline you won’t have to bother with this. 

moveSelected_01

Here you have an object and its keyframes.  If you want to move only the middle frames, select them and run the script. A window will pop-up. You can type how much each click will move the object in x, y or z axis. You may write values ranging from 0.0001 to thousands, billions…

moveSelected_02

 There’s a couple of things you should be aware of before using this script. If you select a collapsed layer, it will select and move all the objects and its childs in the selected layers. And if you select a peg that is a child of another peg that has, for example,  45º rotation, when you click the move right arrow the object will move right but in a 45º path, if the parent peg has a 180º rotation, when you click right it’ll move left, and so on… 

Move Selected

Icons by Pablo Conde

Pablo Conde, from Argentina, sent me some great looking icons for some of the scripts! It’s visually identical to the standard icons in ToonBoom, so it will keep everything looking good. You may download all four here

He has a great demo reel also:

http://vimeo.com/condepablo

convertTo2s ConvertTo2s

toggleStopMotionKeyframe Toggle Stop Motion Keyframe

findCurrentFrame Find Current Frame

swapToZero Swap to Zero

Convert to 2s

Leandro Mello from Brazil asked if there was a way to set a peg’s hold value to 2 automatically through scripting. If you do it manually, you have to double click each function of every peg (x, y, z, scale, etc) and set the hold value to 2. I figured it wouldn’t take long to write such a script, so I did.

Using this script will set the hold value to 2 on the selected layers/pegs ( you may change this value if you know where to find it). It will work in Harmony 10 and Animate Pro 2, but in Animate it doesn’t work on 3D pegs only on ‘separate’ pegs.

Convert To 2s

Updated Scripts

After using any of the old scripts if look at the undo history you’ll see tons of actions that the script did and sometimes it’s impossible to undo all of them, so I updated all the scripts and now you just have to press CTRL + Z once.

There’s a couple of command lines that does it. Use:
scene.beginUndoAccum(“name that will appear in the undo history”);
//your code
scene.endUndoAccum();