Copy link to clipboard
Copied
Is there a way, plug-ins included, to have markers from a precomp show up in the parent timeline? I placed markers in my precomp's workspace, not on individual layers in the precomp, and would like to be able to see them show up on the precomp layer in the parent. Seems like a useful feature but I don't see an automated way to do it. I keep having to recreate the markers and manually adjust them if things change.
@Mods: Move this to an idea if there is no native way to do this because it would be a big productivity booster for me, and I'm sure many others.
Copy link to clipboard
Copied
You can use this script to copy comp markers to another composition.
sync_markers.jsx
(function(thisObj) {
buildUI(thisObj);
function buildUI(thisObj) {
var palette = (thisObj instanceof Panel) ? thisObj : new Window("palette", "Sync Markers", undefined, {
resizeable: true
});
palette.orientation = 'column';
palette.alignfromren = ['fill', 'top'];
palette.spacing = 7;
palette.margins = 10;
palette.add("statictext", undefined, 'FROM COMP:');
var items = [];
var project = app.project;
if (project && project.items.length > 0) {
for (var i = 1; i <= project.items.length; i++) {
var item = project.items[i];
if (item instanceof CompItem) {
items.push(item.name);
}
}
}
var fromCompDropdown = palette.add('dropdownlist', undefined, items);
fromCompDropdown.selection = 0;
palette.add("statictext", undefined, 'TO COMP:');
var toCompDropdown = palette.add('dropdownlist', undefined, items);
toCompDropdown.selection = 1;
var syncButton = palette.add('button', undefined, 'SYNC MARKERS');
syncButton.onClick = syncMarkers;
if (palette instanceof Window) {
palette.center();
palette.show();
} else {
palette.layout.layout(true);
palette.layout.resize();
}
function syncMarkers() {
var fromCompName = fromCompDropdown.selection ? fromCompDropdown.selection.text : null;
var toCompName = toCompDropdown.selection ? toCompDropdown.selection.text : null;
if (fromCompName && toCompName && fromCompName !== toCompName) {
var project = app.project;
var fromComp = null;
var toComp = null;
for (var i = 1; i <= project.items.length; i++) {
var item = project.items[i];
if (item instanceof CompItem) {
if (item.name === fromCompName) {
fromComp = item;
} else if (item.name === toCompName) {
toComp = item;
}
}
}
if (fromComp && toComp) {
while (toComp.markerProperty.numKeys) {
toComp.markerProperty.removeKey(1)
}
app.beginUndoGroup("Copy Comp Markers");
for (var j = 1; j <= fromComp.markerProperty.numKeys; j++) {
var marker = new MarkerValue(fromComp.markerProperty.keyValue(j).comment);
marker.chapter = fromComp.markerProperty.keyValue(j).chapter;
marker.comment = fromComp.markerProperty.keyValue(j).comment;
marker.cuePointName = fromComp.markerProperty.keyValue(j).cuePointName;
marker.duration = fromComp.markerProperty.keyValue(j).duration;
marker.eventCuePoint = fromComp.markerProperty.keyValue(j).eventCuePoint;
marker.frameTarget = fromComp.markerProperty.keyValue(j).frameTarget;
marker.url = fromComp.markerProperty.keyValue(j).url;
marker.label = fromComp.markerProperty.keyValue(j).label;
marker.protectedRegion = fromComp.markerProperty.keyValue(j).protectedRegion;
toComp.markerProperty.setValueAtTime(fromComp.markerProperty.keyTime(j), marker);
}
app.endUndoGroup();
}
} else {
alert('Please select two different compositions.');
}
}
}
})(this);
Find more inspiration, events, and resources on the new Adobe Community
Explore Now