Copy link to clipboard
Copied
Is it possible to search for a comp marker by name and get its time?
Yes, you can do this in CC 2017 or later. Here's an example that will give you the time of the first comp marker called "test" in the currently selected comp:
var activeItem = app.project.activeItem;
var search = "test";
if (activeItem != null && activeItem instanceof CompItem) {
var markerProp = activeItem.markerProperty;
for (var x = 1; x <= markerProp.numKeys; x++) {
if (markerProp.keyValue(x).comment == search) {
alert(markerProp.keyTime(x));
break;
}
}
}
Copy link to clipboard
Copied
Yes, you can do this in CC 2017 or later. Here's an example that will give you the time of the first comp marker called "test" in the currently selected comp:
var activeItem = app.project.activeItem;
var search = "test";
if (activeItem != null && activeItem instanceof CompItem) {
var markerProp = activeItem.markerProperty;
for (var x = 1; x <= markerProp.numKeys; x++) {
if (markerProp.keyValue(x).comment == search) {
alert(markerProp.keyTime(x));
break;
}
}
}
Copy link to clipboard
Copied
Thank you Paul!