Copy link to clipboard
Copied
I would like a function that can close all other comps but the active one from the timeline pannel.
var activeComp = app.project.activeItem;
do {
app.executeCommand(4);
} while(app.project.activeItem != null && app.project.activeItem instanceof CompItem);
activeComp.openInViewer();
source:
Copy link to clipboard
Copied
var activeComp = app.project.activeItem;
do {
app.executeCommand(4);
} while(app.project.activeItem != null && app.project.activeItem instanceof CompItem);
activeComp.openInViewer();
source:
Copy link to clipboard
Copied
Thank you so much @Airweb_AE ! it works perfectly.
I also found this one in the comments of this video:
var projectItems = app.project.items;
var activeItem = app.project.activeItem;
for (var i = 1; i <= projectItems.length; i++) {
if (
app.project.item(i) instanceof CompItem &&
app.project.item(i) != activeItem
) {
app.project.item(i).openInViewer();
app.executeCommand(4);
}
}