Skip to content

MarkerCollection object

app.project.sequences[index].markers

app.project.rootItem.children[index].getMarkers()

The MarkerCollection object represents a collection of Marker objects in a ProjectItem object and Sequence object.

MarkerCollection is a subclass of Collection object. All methods and attributes of Collection, in addition to those listed below, are available when working with MarkerCollection.


app.project.sequences[index].markers.numMarkers

app.project.rootItem.children[index].getMarkers().numMarkers

The count of marker objects in the project item or sequence.

Integer, read-only.


app.project.sequences[index].markers.createMarker(time)

app.project.rootItem.children[index].getMarkers().createMarker(time)

Create a new Marker object on a project item or a sequence.

ParameterTypeDescription
timeFloatA time, in seconds, where marker should be created.

Marker object if successful.


app.project.sequences[index].markers.deleteMarker(marker)

app.project.rootItem.children[index].getMarkers().deleteMarker(marker)

Remove a given marker object from a collection.

ParameterTypeDescription
markerMarker objectA marker object to remove from collection.

Boolean.

Remove all markers from the active sequence

var markers = app.project.activeSequence.markers;
var marker = markers.getFirstMarker();
var count = markers.numMarkers;
while (marker) {
markers.deleteMarker(marker);
marker = markers.getFirstMarker();
}
alert('Removed ' + count.toString() + ' markers');

app.project.sequences[index].markers.getFirstMarker()

app.project.rootItem.children[index].getMarkers().getFirstMarker()

Retrieve the first marker object, sorted by time in seconds, on a given project item or sequence.

None.

Marker object or undefined.


app.project.sequences[index].markers.getLastMarker()

app.project.rootItem.children[index].getMarkers().getLastMarker()

Retrieve the very last marker object, sorted by time in seconds, on a given project item or sequence.

None.

Marker object or undefined.


app.project.sequences[index].markers.getNextMarker(currentMarker)

app.project.rootItem.children[index].getMarkers().getNextMarker(currentMarker)

Get the next available marker, sorted by seconds, starting from a given one.

ParameterTypeDescription
currentMarkerMarker objectA starting marker object, from which to get a next one.

Marker object or undefined.


app.project.sequences[index].markers.getPrevMarker(currentMarker)

app.project.rootItem.children[index].getMarkers().getPrevMarker(currentMarker)

Get the previous available marker, sorted by seconds, starting from a given one.

ParameterTypeDescription
currentMarkerMarker objectA starting marker object, from which to get a previous one.

Marker object or undefined.