-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EF_SelectEveryOtherLayer.jsx
30 lines (22 loc) · 1.01 KB
/
EF_SelectEveryOtherLayer.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**========================================================================
* ? EF_SelectEveryOtherLayer.jsx
* @author Eveline Falcão (https://evelinefalcao.com)
* @email [email protected]
* @version 1.0.0
* @createdFor Adobe After Effects CC 2024 (Version 24.1.0 Build 78)
* @description Selects every other layer. Starts from the first selected layer. Ignores locked layers.
*========================================================================**/
(function selectEveryOtherLayer() {
var comp = app.project.activeItem;
var compLayers = comp.layers;
var selectedLayer = comp.selectedLayers[0];
app.beginUndoGroup("'Select every other layer'");
for (var layer = selectedLayer.index; layer <= compLayers.length; layer = layer + 2) {
var curlayer = compLayers[layer];
if (!curlayer.locked) {
curlayer.selected = true;
}
}
app.endUndoGroup();
})()
// Start from the selected layer