The two most common ways to offset a transform animationto edit its position, rotation, or scale from a point other than its centerare intuitive, easy to use, and well documented. In an individual layer, move the anchor point from the center to a specific point in the frame, typically using the Pan Behind tool (keyboard shortcut: Y). Details can be found in the "Editing the Anchor Point" section.
Although the transform box in the Graph Editor offers a clear visual method for scaling keyframes in time, you can do this in Layer view as well. Select a set of keyframes, Alt-drag (Option-drag) on a keyframe at either end of the set, and the entire set is scaled proportionally in time (with the opposite end of the selected set acting as the stationary anchor).
You can center several layers around a single layer by parenting them to that layer. The children take on all of the transforms of the parent layer (not Opacity, which, remember, isn't a real transform) plus whatever offsets they already have.
The number-one piece of advice when editing an anchor point or creating a parent-child relationship is to do so before animating, if at all possible. With Transform keyframes already in place, these settings work as offsets, and can change the current Position frame, messing up the animation as a whole.
The After Effects developers are consistent in their design of new features: Activating a feature should not change the appearance of the composition. Therefore editing an anchor point position with the Pan Behind tool triggers an equivalent offset to the Position, in the exact opposite direction. Similarly, when you parent a layer to another layer, the child layer does not move even if the parent layer is not at its default position.
That's all clear. But reset an offset anchor point in the middle of a Position animation, and the Position keyframe at that point in time changes. Or undo parenting at a frame other than the one where you set it, and its Position value changes so that it appears to remain in the same place. Weird.
You can override the default behavior described here. To adjust an anchor point or undo parenting without changing any dependent Position value, hold down the Alt (Option) key as you make the change.
Editing the Anchor Point
The most straightforward method to edit an anchor point in the Composition panel is to use the Pan Behind tool (Y); doing so offsets Position to maintain current appearance. For a similar result, you can edit anchor point values in the Timeline, but Position data is unaffected.
It is difficult to edit animated anchor point data in the Composition panel. Instead, activate the Layer panel. If you have animated the anchor point, change the View pull-down from Masks to Anchor Point Path (Figure 2.26).
Figure 2.26. Masks, not Anchor Point Path, is the default Layer display mode. Change that as needed using this menu at the bottom of the Layer panel. Note that the bouncing ball examples included in 02_graphEditor.aep feature an offset (but not animated) anchor point, allowing squash and stretch animation to occur around the point of contact (at the base of the ball).
The 02_graphEditor.aep project used for the bouncing ball animation earlier in this chapter includes an anchor point offset to the base of the ball; this allows the scaling involved for squash and stretch in the bounce to occur around the point of contact.
Editing the Parent Hierarchy
To set up a parent-child relationship, you can choose the target parent layer from the pull-down menu in the Parent column of the Timeline. Or, you can use the pickwhip control next to the pull-down menu, dragging it to the target parent layer. Either method will set multiple selected layers to the same parent.
Parenting "sticks" even when you change layer order or duplicate or rename the parent. You can select all of the children of a parent layer by context-clicking it and choosing Select Children. To remove parenting from all selected layers, choose None from the pull-down menu.
If you ever want to move layers relative to a point that is not represented in any current layer, you can add a null object (for the shortcut, go to Layer > New > Null Object. Null objects are actually 100 x100 pixel layers that cannot be seen in a final render. They possess all of the normal transform controls and can contain effects (and Masks for that matter, which are completely useless in null objects). Contained effects can be used by expressions as reference for other settings; more on this in Chapter 10, "Expressions."