Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Is there any way to use sourceRectAtTime() with Trim Paths?

  • Is there any way to use sourceRectAtTime() with Trim Paths?

    Posted by Andrei Popa on May 3, 2018 at 3:11 pm

    I am creating some handwriting effect and i am trying to add justification by adding an expression to the anchor. But when i animate the “End” of the trim paths to the shapes, anchor begins to float as the writing effect unfolds. I would like it to be in the place it is when the trim paths is at 100%. I thought of adding as time for the sourceRectAtTime() function the time of the last keyframe, but it is not always 100% in the last keyframe. Any ideas on how to do that? This is the expression i currently have
    myLeft = thisLayer.sourceRectAtTime(time,true).left;
    myTop= thisLayer.sourceRectAtTime(time,true).top;
    myHeight = thisLayer.sourceRectAtTime(time,true).height;
    myWidth = thisLayer.sourceRectAtTime(time,true).width;
    temp = effect('AE Handwriter')('Justification');
    if (temp == 1){
    [myLeft + myWidth/2,0]
    }else if(temp == 2){
    [myLeft,0];
    }else{
    [myLeft + myWidth,0]
    };

    Works perfectly on 100% Trim paths, but very bad in animation.

    Andrei
    My Envato portfolio.

    Andrei Popa replied 8 years, 4 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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