Created
November 4, 2021 17:07
-
-
Save justintaylor-dev/658394d610073174f966586d11b69a8b to your computer and use it in GitHub Desktop.
Reveal in Composition #code_aeft
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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