In this lesson, we're gonna look at expression tools available to you on expressed properties.
To open and explore these tools, just add an expression to any property
and you'll see them right here under the value.
The Pick Whip, or "pick whipping" is the term for the drag-and-drop
selection method in After Effects.
The most common use you're probably familiar with is the layer parenting system in After Effects.
This is the technique of selecting a child element, clicking and dragging on the
Pick Whip tool, hovering over a parent element, and releasing your click,
which links the two layers together.
When adding an expression to a property, a new tool that's available to you
is the Pick Whip tool.
It's this spiral icon here, located next to the Post-Expression Graph
and the Expression Language Menu.
If you click and hold on this icon, you'll notice that a whip follows your mouse cursor.
You can hover over other properties and let go over them to now reference that property.
You'll also notice that if you release this click over an invalid target,
a sweet whiplash animation occurs.
If you place your text cursor in the text field here, and then pick whip a property,
it inserts it right where the cursor was located.
You can also highlight a portion of text and pick whip something to replace the entire
contents of that highlight.
There's one important note here: the Pick Whip tool is restricted to the
composition you're working in.
It also requires the property you are referencing to be visible in the timeline.
If you want to reference a property on another layer in your composition, you must first
expand that property to make sure it's visible in either the Timeline or the Effect Controls panel.
If you have a lot of properties open in the timeline, you can easily solo a property
by highlighting it here and rapidly tapping "S + S" This will open up just the property
you highlighted and allow you to easily pick whip and reference that property.
Now that you've pick whipped some values, I'm gonna walk through a quick example.
First, I'm gonna come up to the Rocket Null and highlight it, and then I'm gonna go to
Effect > Expression Controls > Angle Control
And we're gonna go over Expression Controls later in the course.
For now, I'm just gonna rename this "Rocket Rotate" and with this Rocket Null layer selected,
I'm gonna hit "R" on my keyboard to open up the Rotation property, and I'm gonna
add a new expression to the Z Rotation property.
And now I'm gonna come down and click and hold on the Pick Whip tool and drag this whip
up to the Angle property of the Rocket Rotate effect.
Now, as I let go, you'll notice that it's gonna replace our highlighted text here
with a new reference,
effect("Rocket Rotate")("Angle")
Now, if I click out of the expression field to save my changes,
and come up to the Rocket Rotate value, and you'll notice as I scrub this value
the Z Rotation dynamically changes with this expression controller.
Pretty cool!
For those who like to tinker and experiment with the wide range of expressions in After Effects,
there's a great tool for you. It's called the Expression Language Menu.
Now this is located on any property that has an expression applied, and you'll see
the arrow icon next to the Pick Whip tool.
So I'm gonna hit "~" (Tilde) on my keyboard to fullscreen this view
so we can see the menu a little better, and clicking on this arrow icon opens up the menu.
This menu is organized into categories of common expressions and their syntax.
Some common categories you're probably going to use are gonna be:
Property
Layer
Interpolation
and Global.
To experiment with one of these, just highlight the one you want to use, and click it.
It's going to insert this expression where your cursor was located,
or overtop of your highlighted text.
Now, if you click out of this expression field, an error will likely occur.
This error is because these are temporary placeholder values that need to be edited first.
Values such as "tMin", "tMax", and "value1" are empty references in the syntax
to help you build an expression.
We're going to cover methods like this linear method later in the course.
Now there's also the After Effects Expression Language Reference on Adobe's website.
This is a great resource which provides information on these values and expression syntax.
If you're familiar with the graph editor, the Post-Expression Graph will be a useful tool for you.
It's an easy way to visualize how a property's expression is affecting a value over time.
The graph displays the original keyframed value alongside the expressed value.
Now, to work with the Post-Expression Graph, you have to be in the Graph Editor,
which you can toggle here at the top right of your Timeline controls.
Now, to actually see the Post-Expression Graph in action, we're going to have to use it
on a property with an expression applied.
So, in this case, I just added an expression to the Z Rotation property, and I don't have
any keyframes yet, so nothing's gonna be displayed on the graph.
So I am gonna add two keyframes to get started, I'm gonna add one at position 0,
and I'm gonna come to 1 second and change this to 180.
So now we have two keyframes and you can see that it's a steady 180 degree per second change
from 0 to 1 second.
And we have our default expression here
transform.zRotation
which is referencing itself and not changing the value at all.
But if I change this to something like
value * 2
you'll notice that the 180 is now gonna change to one full rotation, so 360.
But the graph has not changed at all.
So, we have to come down here and enable it using the button here between the
Enable Expression and the Pick Whip tool.
So if I click on this, it now gives us two lines representing the value change.
The original, from 0 to 180, and the new, from 0 to 360.
So that's kinda cool, we can compare these values.
But what if I want to see a more drastic value change?
I can actually just change the keyframes.
So I'm gonna click Z Rotation again to now select both of these keyframes,
and I'm gonna hit "F9" on my keyboard.
By doing this, it converts both of these keyframes to Easy Ease, so it's gonna
ease in and ease out of the animation.
And now you really start to see what the Post-Expression Graph does.
Our original value goes from 0 to 180 with a nice ease curve here in the center.
But value * 2 expression is doubling that amount and going from 0 to 360
using a much more drastic ease curve.
Now, you'll notice there's two lines.
The dim line is always going to be the original value, and the brighter line
is going to be the expressed value.
And if I change this expression to something more drastic, like
wiggle(5, 20) 5 per second, and 20 amplitude
and click away, now we really start to see what this value graph is doing.
So it's giving us our original ease from 0 to 180, nice and plain vanilla here.
And it's also giving us this really cool visualization of what the wiggle expression is doing.
We've arrived at the end of Lesson 104: Mastering the Expression Tools in After Effects
If you enjoy this expressions course, consider purchasing the paid content.
It includes in-depth documentation, extra tutorial content, high definition videos,
and all the project files used in the training.
Your purchase will help to create morefree courses like this in the future.