Errors ?

Learn how to deal with errors

1. AE CC 2015 (13.5)

Finally, Adobe decides to change the way expression errors are handled in AE, expressions toggle is no longer disabled if expression is not valid. Instead it displays a warning message and a warning icon next to the expression; clicking on it allows to access the error message.

It will also handle temporary errors; for example in the previous topic Subtitle track from an external file, when using markers, we created an if/else condition to avoid looking for marker 0.

{ if (m == 1) {“”} else

This is no longer required, as it will not disable the expression because of a unique event.

Read the official Adobe blog post here : http://blogs.adobe.com/aftereffects/2015/06/changes-to-expressions-in-after-effects-cc-2015-13-5.html

2. And before 2015 ?

To prevent unique or specific errors, you could make a set of if/else conditions; but if something is missing, for example applying the color expression from topic Color Palette / Swatches without having the color swatches in the timeline (or forgot to rename the layer to “colors”), that would not prevent from disabling the expression.

try {code} catch(err) {code}
acts like a conditional statement;
It tests the block of code for errors, if no errors it is executed,
if errors are found it will execute the alternate code specified in the catch(err)

read more about javascript errors here : JavaScript try/catch/finally Statement

3. Reactivate

Let’s say you deleted by mistake a master layer to your expressions, then they all are deactivated; even a Cmd+Z won’t bring them back to life. Oh yeah, you know what I am talking about, revealing all expressions to re-enable them one by one while lashing yourself and cursing the world you live in!

ActivateDisabledExpressions is a free script that will save your life; it will look for the disabled expressions and batch – reactivate them.

If you have a few bucks to spend, I highly recommend to Paul Tuersley’s ExpressEdit 2, a great script that can find disabled expressions, but also can be used as an expression library to save your codes, search for specified and batch apply expressions to selected layers.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s