AE creates a marker per frame
// TMN_markerPerFrame_Workarea.jsx
// written by fabiantheblind
// http://www.the-moron.net
// this makes sense to use it with: pt_ContactSheet.jsxbin
// http://aescripts.com/pt_contactsheet/
// this is for one comp layer could also iterate thru all items in selection
markerPerFrame();
function markerPerFrame(){
app.beginUndoGroup("Marker Per Frame");
var curComp = app.project.activeItem;
if (!curComp || !(curComp instanceof CompItem))
{
alert("Please select a Composition.");
return;
}
if(curComp.selectedLayers.length < 1){
alert("sry. You need to select a layer");
return;
}
var layers = curComp.selectedLayers;
var a = curComp.frameDuration;
var b = curComp.workAreaDuration;
var c = curComp.workAreaStart;
var d = curComp.frameRate;
var len = b*d;
//alert(len);
for(var j = 0; j < layers.length ; j++){
layer = layers[j];
for(var i = 0; i < len;i++){
var m = new MarkerValue("");
var markers = layer.property("marker");
markers.setValueAtTime(c+(i*(a)),m);
}
}
}