-
Getting the precise timecode for Layer Markers
Mornings folks,
I need to get the precise timecodes of specific Layer Markers – I need them for moving all keyframes between the two markers in all nested compositions.
I can find the Layer Marker based on the index and its comment but then how do I get its timecode?
Should it iterate through the frames of the timeline – find the nearest marker and then how do I get the precise timecode?
I feel like I’m missing something very obvious – I’m faily new to ExtendScript but starting to get the feeling that mostly everything is possible some way or another…
Thanks for your help,
Martinfunction getLayerMarkerTime(layer, markerComment)
{
layer.containingComp.openInViewer();
var markerTime = 0;for(var i = 1; i < 100; i++){
var marker = layer.property("Marker");
var commentOfMarker = marker.keyValue(i).comment.toString();if(commentOfMarker == markerComment){
//inMarkerTime =
//alert("im markerIn: " + layer.keyTime(marker));
break;
}
};
}