FORUMS: list search recent posts

How to get AV Layer's duration using script?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Renata Klimiato
How to get AV Layer's duration using script?
on May 15, 2016 at 2:02:10 pm

I have a layer in my comp, which is a video file and I need to get it's duration using script. Can anyone help me? myComp.duration shows me duration of comp, however myComp.layer(2).duration isn't working...


Return to posts index

Xavier Gomez
Re: How to get AV Layer's duration using script?
on May 15, 2016 at 7:13:25 pm

Layers don't have a duration attribute. Only AVItems do (things in the project panel).
You can get the duration of the layer itself from its inPoint and outPoint, or the duration of its source by: layer.source.duration (not all layers have a source though).

Xavier


Return to posts index

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