Tag: mockup

Global & Local Variables in AE Expressions

I spend a fair amount of time working with expressions, mostly for linking properties to other layers and driving animation from fewer keyframes. (It can save time when I ultimately have to retime animations or reuse them in different ways.) One thing that’s always bothered my about expressions is not being able to share variables between properties. Sure there are workarounds like using expression controls, but in all honesty, I like clean code. It’s easier to set up circleRadius = this.effect("Width").slider; once and use circleRadius in all the expressions in that layer (or comp) instead of always retyping this.effect("Width").slider or pickwhipping each time I want to use it.

By using a local or global variable, it would reduce complexity in the expressions. It would also have the added benefit of being able to change one line of code and affecting everywhere that variable was used. Say, for example, I was referencing transform.position.key(3) in 20 places in my layer. If I wanted to now use key(1), or if I added a keyframe and what was key(3) is now key(4), I’d have to change all 20 of those expressions. With local/global variables, I could change one line and it would be done.

The tricky part is how this could be accomplished. Here’s an example of some recent expression sets I’ve written to drive two Beam effects based on the position of a shape layer.

This is a fairly uncomplicated example, but shows using the same values many times.

As I mentioned earlier, what if I added new keyframes to the beginning of the shaper layer. It would change all the key values and I’d have to dig in and change all the expressions. A workaround would be to create a new null, parent, and animate that1. But who likes workarounds?

What if instead there were an extra layer property called “Expression Variables”? This way, you could set up variables that can be used by any property in the layer using local, or the entire comp with global declarations.

Click for larger image.

In the end, it’s possible to work around all of this, but for anyone working extensively with expressions, it could save a lot of time and frustration.

  1. Or, since I’m really animating the shape transform, I could animate the position of the actual shape layer.

Wishlist: Folders in AE Timeline

A conversation sparked today on Twitter about how After Effects could better handle organization in the timeline. The idea of folders comes up frequently, but seems to consistently be struck down as it would introduce a lot of complexity into the render order. But what if we don’t look at folders in the timeline as additional layers, but simply organizational tools in the UI that don’t affect the render order at all?

How folders in the AE timeline might look.

In this mockup, a folder is just a collapsable element to easily group sets of adjacent layers in the timeline only. They could be hidden, soloed, or locked, but have no transform capabilities, nor can they have effects or transparency modes applied to them. Think of it as a much more granular shy switch.

Now, this might not fit the use case for everyone’s timeline management, but better control over timeline organization seems to be something many are asking for.

What would you like to see change in After Effect’s timeline, or the application as a whole?