Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression to delay timing on parented layer

  • Expression to delay timing on parented layer

    Posted by Pat Bray on April 29, 2010 at 2:29 pm

    Hi there

    I wondered if anyone could help with an expression. Basically I have a couple of layers, one parented to the other and want to animate one but have the parented layer to animate say, a second or two behind the other, which will save me copying and pasting a ton of keyframes and have a tidier workflow!

    Any ideas would be great,

    P

    Thomas Anderson replied 5 years, 7 months ago 7 Members · 14 Replies
  • 14 Replies
  • Michael Szalapski

    April 29, 2010 at 7:05 pm

    You will love this.

    – The Great Szalam
    (The ‘Great’ stands for ‘Not So Great, in fact, Extremely Humble’)

    No trees were harmed in the creation of this message, but several thousand electrons were mildly inconvenienced.

  • Dan Ebberts

    April 29, 2010 at 7:52 pm

    If what you’re trying to do is delay a parented layer’s movement, you could do it with a position expression like this:

    delay = .5;
    parent.fromWorld(toWorld(anchorPoint,time-delay))

    Dan

  • Jamie Bradshaw

    November 5, 2014 at 10:03 am

    Thanks for this Dan. I was completely unaware of the fromWorld expression. This is a really powerful technique.

    What would be the equivalent expression be for creating a parented delay effect for orientation?

    Thanks,
    Jamie

    JimJam•Graphics
    https://www.jimjamgraphics.com/

  • Fernando Huezo

    May 20, 2015 at 9:38 pm

    Hi Dan
    Why this expression is disabled when the scale is animate from 100 to 0 on the parent layer?

  • Dan Ebberts

    May 20, 2015 at 9:53 pm

    I think those layer space transforms will die when scale is zero. I haven’t tested this, but it might fix it:

    delay = .5;
    try{
    parent.fromWorld(toWorld(anchorPoint,time-delay));
    }catch(err){
    value;
    }

    Dan

  • Fernando Huezo

    May 20, 2015 at 10:17 pm

    the same thing keeps happening
    this is my scene I dont know what is the problem

    I have the HeadKid whit a wiggle in position, the B_Puppet Pin 4 follow the head wiggle with a nice delay, beautiful!!! I animate the scale of the HeadKid 114 to 0 my secod keyframe in scale and boom! thats happen

    How fix this problem?

  • Dan Ebberts

    May 20, 2015 at 10:50 pm

    The message you posted is actually from a different layer than the one where you have the expression exposed. Did you make that update everywhere you’re using that expression?

    Dan

  • Fernando Huezo

    May 20, 2015 at 11:02 pm

    the problem come from HairKid layer instantly when I animate the HeadKid scale to zero. All the bones expressions are disabled

    Exist other way to do the same or this problem no have solution?

  • Dan Ebberts

    May 20, 2015 at 11:35 pm

    If you let the scale go to zero, any expression that has toWorld() needs to be wrapped in try/catch, like the example I gave you.


    try{
    bonePos = ....

    }catch(err){
    value;
    }

    The other thing you could try is not letting scale get all the way to zero. Maybe 0.01 instead.

    Dan

  • Fernando Huezo

    May 20, 2015 at 11:55 pm

    thank you very much for your patience!
    works, no more mistakes!

    many thanks Dan

Page 1 of 2

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