ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Time of last key

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
stuart gibb
Time of last key
on Nov 9, 2017 at 12:13:13 pm

Hello,

I am trying to determine the time at which my trim path shape reaches 100% complete.

I am able to determine the current value using:

thisComp.layer("Shape Layer 1").content("Shape 1").content("Trim Paths 1").end.value

How do I combine the above with the .key/.time to determine the time of the last key i.e. 100% complete?

Thanks,

Stuart


Return to posts index

Dan Ebberts
Re: Time of last key
on Nov 9, 2017 at 4:43:54 pm

Try this:

prop = thisComp.layer("Shape Layer 1").content("Shape 1").content("Trim Paths 1").end;
prop.key(prop.numKeys).time


Dan



Return to posts index

stuart gibb
Re: Time of last key
on Nov 11, 2017 at 8:48:37 am

Excellent Dan, thank-you.

Next question if I may, I am using your up-down timer expression.

The inpoint on my text layer is > 0.

Prior to the inpoint, I want to set the text to read "00:00".

How would I do this? I can't determine the value of time prior to the text layer's inpoint?


Return to posts index


Dan Ebberts
Re: Time of last key
on Nov 11, 2017 at 10:40:09 pm

I'm not at all sure I understand the question, but maybe like this:

clockTime = Math.max(rate*(time - inPoint),0);


Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]