Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Parent and Expressions

  • Parent and Expressions

    Posted by Vahab San on July 7, 2018 at 9:23 am

    Hi all

    I have a simple animation on a solid layer’s position using “linear(time, 0, 3, [0,0], [500,500])”. (I must have the Position nim and max amount accurate coordinates.)
    When I parent this layer to a null, position changes (anchorPoint of the null will become the center of animation on solid [0,0], and it disregards the native position of the layer)

    How could I use expressions in a way that parent works like its keyframed animation (Solid layer stays in its place)?

    Thanks a lot

    a = [0,0];
    b = [500,500]

    c = linear(time,0,3,a,b);

    Vahab San replied 7 years, 10 months ago 2 Members · 6 Replies
  • 6 Replies
  • Dan Ebberts

    July 7, 2018 at 1:40 pm

    Try it this way:


    a = [0,0];
    b = [500,500];

    if (hasParent){
    a = parent.fromComp(a);
    b = parent.fromComp(b);
    }

    c = linear(time,0,3,a,b);

    Dan

  • Vahab San

    July 7, 2018 at 6:20 pm

    Hi Dan

    Thank you for respond.

    It perfectly keeps the solid to its place when I’m parenting it, but then it neutralizes the parenting effect on the null. I mean the solid is not following the null anymore as its child.

  • Dan Ebberts

    July 7, 2018 at 7:27 pm

    Sorry, I guess I didn’t understand what you’re trying to do.

    Dan

  • Vahab San

    July 7, 2018 at 8:34 pm

    I’m sorry I couldn’t make it understandable.
    I’ve recorded a very short video, I hope that you have time to take a look at it:

    Thank you so much for your time.

  • Dan Ebberts

    July 7, 2018 at 8:43 pm

    OK, I think I get it. Unfortunately, I don’t think there’s any way to have a live link with the null like that because the expression has no way of knowing that the null has moved in the UI. It’s a different story if you’re keyframing the null movement, because the expression can compare where the null is now to where it was at time zero.

    Dan

  • Vahab San

    July 8, 2018 at 6:04 am

    Yeas I know what you mean.

    Thanks a lot, Dan

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