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.
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.
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.