Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Get position on timeline from other comp

  • Get position on timeline from other comp

    Posted by Allard Rothengatter on September 11, 2015 at 9:58 am

    Hey guys,

    Anwser to this one is probably pretty straight forward, but I am having a hard time figuring it out.

    I have a comp with an animation triggered by a marker positioned at say 5 seconds in the main timeline. This works great, provided the comp starts at 0:00:00:00 in the main timeline. As soon as I reposition the comp to start at, for instance, 0:00:03:00 my animation still works, however it starts at 8 seconds (the 3 second delay for moving the comp down the timeline, and then te 5 seconds which is the position of the marker in the main timeline).

    I need to figure out how to get the current frame of the main timeline in stead of the current frame of the comp containing the animation.

    My code is roughly like this:
    ease(time, nextMarkerTime, nextMarkerTime+1,0,100);

    And I would like it to be something like:
    ease(comp('Main Timeline').time, nextMarkerTime, nextMarkerTime+1,0,100);

    However, AE doesn’t accept the comp('Main Timeline').time part.

    Any clues on how to fix this…

    Thanks,
    Allard

    Allard Rothengatter replied 10 years, 9 months ago 2 Members · 4 Replies
  • 4 Replies
  • Miguel De mendoza

    September 11, 2015 at 10:52 am

    You must route a concrete instance of the animation comp:
    comp("Main Timeline").layer("AnimationComp").startTime

  • Allard Rothengatter

    September 11, 2015 at 11:02 am

    Alright, and based on the comp start time in the main timeline do some maths to figure out the start point for the animation?!

    Thanks for pointing me in the right direction. Will dive into it…

  • Miguel De mendoza

    September 11, 2015 at 11:37 am

    Yes, but no complex math here, just add startTime value to the times you want to control.

  • Allard Rothengatter

    September 11, 2015 at 11:39 am

    Thanks!!

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