Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Getting the precise timecode for Layer Markers

  • Getting the precise timecode for Layer Markers

    Posted by Martin Bollerup on November 27, 2012 at 8:55 am

    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,
    Martin

    function 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;
    }
    };
    }

    Martin Bollerup replied 13 years, 5 months ago 1 Member · 1 Reply
  • 1 Reply
  • Martin Bollerup

    November 27, 2012 at 9:05 am

    Sorry – missed that markers behave like keys…?

    Have a great day,
    Martin

    alert("marker.keyTime(i): "+marker.keyTime(i));

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy