expressions

Bezier Curve to Control Several Objects in Toon Boom Harmony

* Tested in TB Harmony 14 and 15.

This deformer can control the position of several objects without distorting their shapes, by using expressions.

One thing I noticed when using rig with expressions is that if you have rig A and rig B (which is a copy of A), if you copy and paste keyframes (from the pegs with expressions) in the timeline from rig A to rig B, sometimes TB will replace the expressions in rig B with the ones in rig A, and vice versa.

If this happens, you should have a copy of the original rig B, then copy the keyframes (from any frame) from the original rig into the rig that has the wrong expressions.

BezierCurveRig

 

Advertisements

About expressions…

Recently I found out there’s no need for the ‘Recalculate Expressions’ script. You just have to use the column(columnName) function, which according to the documentation only does:

“Identify the text wrapped by columnName to be renamed whenever the column named “columnName” is renamed.”

When writing an expression do something like this:

var pegValue = column(“PegA_Pos_x”); //name of the function from where you’re taking the values.

//I like to put the function’s name in a variable so I can change it easily if I have to.

value(pegValue, currentFrame);

Using this expression (supposing you are using it in the X axis of PegB) every time you move PegA in X, PegB’s X value will be updated right after.

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.