Check if marker exists
Posted: July 2nd, 2013, 10:40 am
Is it possible to check if a marker exists where the Current Time Indicator is?
Code: Select all
var activeItem = app.project.activeItem;
if (activeItem instanceof CompItem && activeItem.selectedLayers.length == 1) {
var theLayer = activeItem.selectedLayers[0];
var markerProp = theLayer.property("ADBE Marker");
if (markerProp.numKeys > 0) {
if (markerProp.keyTime(markerProp.nearestKeyIndex(activeItem.time)) == activeItem.time) {
alert("There's a marker on this frame");
} else {
alert("No marker on this frame");
}
}
}