Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Move and Trim according to markers – AE scripting

  • Move and Trim according to markers – AE scripting

    Posted by Jacob Thorup on October 16, 2019 at 5:09 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

    Jacob Thorup replied 6 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 16, 2019 at 5:16 pm

    Use keyTime() instead of keyValue().time

    Dan

  • Jacob Thorup

    October 17, 2019 at 3:02 pm

    Thanks Dan!
    Worked a treat!

    Thanks for helping this Noob.

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