ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Layer Markers on Text Layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Nathaniel Logan
Layer Markers on Text Layer
on Jan 19, 2019 at 12:28:20 pm

Hi,

I'm trying to insert layer marker on a text layer from the below script and it works perfectly fine.

But the problem is the marker is placed at the Time interval of 2seconds, which is fine but. if my layer is starting from 5second the Marker has to be placed at 7second but when i run the script the marker is placed at the 2 seconds which is the empty area.

Can you help me on this, the marker has to be placed at "Inpoint(of the layer)+2second"

Thanks,
Much appreciated.

var myComp=app.project.activeItem;
var myMarker = new MarkerValue("anything");
myComp.selectedLayers[0].property("Marker").setValueAtTime(2, myMarker);


Return to posts index

Andrei Popa
Re: Layer Markers on Text Layer
on Jan 19, 2019 at 2:31:25 pm

This should do it

var myComp=app.project.activeItem;
var myMarker = new MarkerValue("anything");
var myLayer = myComp.selectedLayers[0]
myLayer.property("Marker").setValueAtTime(myLayer.inPoint+2, myMarker);


Andrei
My Envato portfolio.


Return to posts index

Nathaniel Logan
Re: Layer Markers on Text Layer
on Jan 20, 2019 at 6:13:01 am

Thank you so much Andrei.

Works like charm :)


Return to posts index

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