Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Parenting a layer, using ONLY expressions?

  • Parenting a layer, using ONLY expressions?

    Posted by Vince Lund on September 9, 2010 at 10:25 am

    Hi There,

    This is my first post, I hope someone can help me out here.

    I have two layers, currently linked together using the Parent pick-whip. Moving, scaling or rotating the first layer affects the other layer.

    What I want to do is NOT use the parent layer option, and INSTEAD use a set of expressions applied to the Pos, Rot, and Scale properties of the second layer. But I can’t work out what expressions to use, so as to exactly mimic the Parent Layer property.

    The reason for this is that I want to dynamically change the parent of the layer, at certain times – ie, for first few seconds, layer follows Null 01, for next few seconds layer follows Null 02, and so on…

    Any help would be appreciated!

    Thanks,

    Vince Lund replied 15 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Nick Hill

    September 9, 2010 at 1:19 pm

    You can do something like –

    (layer’s position property)

    L = thisComp.layer(“Null 1”); // rename for your null
    L.transform.position;

    (rotation)

    L = thisComp.layer(“Null 1”);
    L.transform.rotation;

    etc.

    But then you’d need to add extra complexity to it to handle the switchover – and if the nulls are in different positions the layer would jump.

    A better solution might be to parent Null 2 to Null 1, and the layer to Null 2. Then just move one null at once.

  • Vince Lund

    September 11, 2010 at 9:31 am

    Thanks, however this would just set my position to the same as the other null’s position… I need it to ‘follow’ from it’s own position, not move directly to a new position.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy