Activity › Forums › Adobe After Effects Expressions › A question about parenting.
-
A question about parenting.
Posted by Steingrimur on June 11, 2005 at 2:03 amI’ve parened one layer to another, but I want the child layer only to be affected by the movement of the parent layer and not the scale, opacity, rotation or anything else. How would I go about doing this?
Dan Ebbertsreplied 19 years, 8 months ago 4 Members · 4 Replies -
4 Replies
-
Joe Chao
June 11, 2005 at 2:20 amThis effects can be achieved by using expressions.
For example ,you want to parened layerA to layerB,
Add following expression to the position property of layerA;
thisComp.layer(“layerB”).position****************************
My name is always misread as COW……..:)
so I got this ID:
friendcao2004@hotmail.com -
Mike Clasby
June 11, 2005 at 2:25 amFirst, unparent the layer (change to “none”).
Then set up a simple expression so that the ex-child layer matches the position of the ex-parent layer.
Select both layers, hit the “p” key.
Alt-Click the ex-child’s position stopwatch, this opens a box to write an expression for position (it says, position, in the timeline)
we’ll use the pickwhip (the littlemiddle gray box with the spiral in it) to write it for us. Drag the pickwhip in the ex-child layer, down to the position of the ex-parent layer. Now an expression
appears in the space that says, thisComp.layer(“layer name”).position, that tells your ex-child layer to take the position
of “layer name” (whatever the name of the ex-parent layer is). Now the ex-child follows (match the position) the ex-parent, ignoring
any other changes. -
Steingrimur
June 11, 2005 at 2:26 amHmmm…. expressions seem like a very important aspect of AE, I should probably start learning more about them and the possibilities they bring.
Thanks for the answer.
-
Dan Ebberts
June 11, 2005 at 6:08 pmYou may be looking for an expression that maintains the spatial relationship of the two layers. If so, you need an expression like this for the child’s position:
p = thisComp.layer(“parent”).position;
deltaAtZero = p.valueAtTime(0) – position.valueAtTime(0);
p – deltaAtZeroWhere “parent” is the name of your parent layer. Now you can move the parent layer and the child will follow, but you can independently rotate or scale the parent.
Dan
Reply to this Discussion! Login or Sign Up