Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
If you haven't already, revert back to a clean version of your AEA_expressions.aep project and open up the comp 01-Pick Whip*starter. Again, we have the blue pulley already animating. I'm pressing U to reveal its keyframes, and I'll press 0 on the numeric keypad to RAM Preview. We want the red pulley to perform this exact animation, at least for now. And rather than copying and pasting keyframes, let me show you another way. I am going to click on the red pulley, press S to reveal the Scale and Shift+R to reveal its rotation.
Instead of just clicking on the animation stopwatch for Scale to enable it, instead I am going to hold Option on Mac, or Alt on Windows, then click on its scale. Rather than enabling keyframing, this enables expressions. I am going to drag this column a little bit wider, so see what's going on, and you can see this new line that says expression for Scale. After Effects has already written a little bit of code for us. It says, use the Transform property of Scale to be the scale of this layer, in other words equal yourself, a good starting point.
But instead of equaling ourselves, we want to equal what that other layer is doing. Well, to do that, we'll click on this little Pick Whip icon, drag it to the Scale property of the other layer--and you will see that After Effects highlights different property names and values to show you what you are targeting--release, and now After Effects has written an expression for you. Now I want to emphasize this, for most of this lesson you will not be writing code. After Effects will be writing code for you, and you just need to be making little modifications.
But if you are curious about what this is doing, let's read this. It's saying in this comp is a layer called Blue Pulley and we want to use its Transform property Scale. Straightforward enough. To accept an expression, you can either press the Enter key on the numeric keypad--not the normal keyboard, that will just start a new line--with the numeric keypad, or just click anywhere else in a blank area inside your Timeline panel, and now you have an expression. You see this little equal sign here that indicates that an expression is in force right now, and the parameter color will change to red instead of the default gold.
Now when I press 0 to RAM Preview, you will see that the red pulley is doing exactly the same scale animation as the blue pulley. It's not doing the same rotation. This isn't like parenting where you take out a lot of properties; we've targeted this one property, Scale, and expressed the red pulley to do whatever the blue pulley is doing. And just to show you that it is indeed doing whatever the other pulley is doing, let's go ahead and pick up this keyframe and move it a little bit earlier in time.
As I do so, you will see the red pulley is scaling in sync. I will RAM preview and it continues to copy exactly the same animation move that the blue pulley is doing. That's one of the big benefits of expressions. They are live. Edit the Master layer and the Express layers will automatically take up those changes; no need to copy and paste. Okay, we've got the Scale happening but not the Rotation, so let's go ahead now to add that as well. Again, I will hold down Option on Mac, or Alt on Windows, click on the stop- watch, go to my handy-dandy Pick Whip tool and drag that to the Rotation property for the blue pulley, the master I want to follow.
And this is important tip about expressions, by the way: before you start creating an expression, you need to reveal the properties that you want to connect to. I have already revealed the Rotation for blue pulley so I am in a good shape. Select that. There is my expression. Click off. It's been accepted. The parameter color changes red instead of gold, my equal sign is active, RAM Preview, and these two layers are now doing exactly the same thing. And I want to point out how easy it is to make changes to the master and have the slave follow.
I'll go to the end here. I'll change the Rotation for the blue pulley to -1, RAM Preview. Now they are both rotating exactly the same. I'll move that second keyframe for the blue pulley to equal its last Scale keyframe, RAM Preview, and again, both layers are doing exactly the same thing. And hopefully now you are starting to see some of the usefulness of expressions.
Get unlimited access to all courses for just $25/month.Become a member
110 Video lessons · 47399 Viewers
86 Video lessons · 9779 Viewers
350 Video lessons · 99653 Viewers
79 Video lessons · 13301 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.