FORUMS: list search recent posts

Layer markers script

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Błażej Pieczonka
Layer markers script
on May 11, 2017 at 2:20:08 pm

Hello

I am struggling with scripting a simple tool for adding layer markers in my AE project. So far everything works except adding layer marker itself. I am using this code:

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


and get en error:

"Function selectedLayers.property is undefined"

What am I doing wrong?


Return to posts index

Walter Soyka
Re: Layer markers script
on May 11, 2017 at 2:34:05 pm

selectedLayers is an array. You need to specify one of the elements by index. For example, the first selected item:

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


Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

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