Copy link to clipboard
Copied
I'm trying to script some time manipulations in After Effects on a comp that was imported from a clip in Premiere Pro (using "Replace with After Effects Composition" in PP).
The problem I have is that the expression I'm using to modify time needs to make calculations relative to the start of the comp, not the start of the file containing the comp, but frame 0 is always the start of the file, and as such may exist well outside the boundaries of the clip from which I'm trying to build the composition.
I can see that AE knows where the start of the comp is in the file-- it displays that time when I enable time remapping.
How do I get at that time or frame number programmatically in the expression so I can make calculations relative to the start of the comp instead of the start of the file? (startTime, inPoint, and displayStartTime are all 0.)
Copy link to clipboard
Copied
You can retrieve the source clip time code, you know, so I'm not sure what the actual problem is. If you need additional references for your calculations, simply split the clip or add markers. Other than that you can always create exactly trimmed new master clips in Premiere and avoid having to deal with complicated math at all once it fits the comp duration exactly...
Mylenium
Copy link to clipboard
Copied
I guess my question is HOW do I retrieve the time code of the start of the source clip? The properties that I would have expected to contain this value are all relative to the comp, not relative to the clip (ie, they're all 0).
What property or method should I be using to get the time of the start of the clip for use in an expression?
Copy link to clipboard
Copied
thisLayer.source.timecode() not working?
Mylenium
Copy link to clipboard
Copied
No, that produces an error that thisLayer.source.timecode() is not a function.