Skip to content

Instantly share code, notes, and snippets.

@justintaylor-dev
Created November 4, 2021 17:07
Show Gist options
  • Save justintaylor-dev/658394d610073174f966586d11b69a8b to your computer and use it in GitHub Desktop.
Save justintaylor-dev/658394d610073174f966586d11b69a8b to your computer and use it in GitHub Desktop.
Reveal in Composition #code_aeft
// Reveal in Composition for the first item selected in the project panel
var item = app.project.selection[0];
if(item){
var comp = item.usedIn[0];
if(comp){
comp.openInViewer();
for (var i = 0; i < comp.layers.length; i++) {
var layer = comp.layers[i+1];
layer.selected = layer instanceof AVLayer && layer.source.id === item.id;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment