ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Move and Trim according to markers - AE scripting

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jacob Thorup
Move and Trim according to markers - AE scripting
on Oct 16, 2019 at 5:09:23 pm

I know this is going to be something simple, but I'm having trouble getting the time value for a layer marker.

I have 300 plus videos that I need to add disclaimers and other titles to. My plan is to add markers on the videos where the new elements need to be added and then use a script to add those assets. The future value will be when they need to change these elements again. I'll have the project and script ready to go!

I've been able to get the "duration" of a marker, but am having trouble setting the inPoint of a layer according to a marker's time.

Thanks in advance.
apologies for being such a noob :-(

var lowerThird = theComp.layer(1);
var openDisclaimer = theComp.layer(2);
var closeDisclaimer = theComp.layer(3);
var endCard = theComp.layer(4);
var openLogo = theComp.layer(5);
var closeLogo = theComp.layer(6);
var video = theComp.layer(7);
var m1 = video.property("Marker").keyValue("1").time;

openDisclaimer.startTime = 0

openDisclaimer.outPoint = 7

openLogo.startTime = openDisclaimer.outPoint - 1

video.inPoint = m1

video.startTime = 9


Return to posts index

Dan Ebberts
Re: Move and Trim according to markers - AE scripting
on Oct 16, 2019 at 5:16:30 pm

Use keyTime() instead of keyValue().time


Dan



Return to posts index

Jacob Thorup
Re: Move and Trim according to markers - AE scripting
on Oct 17, 2019 at 3:02:46 pm

Thanks Dan!
Worked a treat!

Thanks for helping this Noob.


Return to posts index

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