-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathUnlock All Layers.jsx
36 lines (33 loc) · 1.06 KB
/
Unlock All Layers.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
31
32
33
34
35
36
/**
* @name Unlock All Layers
* @version 2.0
* @author Kyle Martinez <www.kyle-martinez.com>
*
* @description Unlock all layers in all conmpositions in the current project.
*
* @license This script is provided "as is," without warranty of any kind, expressed or implied. In
* no event shall the author be held liable for any damages arising in any way from the use of this
* script.
*
* I'm just trying to help make life as an After Effects animator a little easier.
*/
(function unlockAllLayers() {
function unlockAllCompositionLayers(comp) {
var layers = comp.layers;
for (var l = comp.numLayers; l > 0; l--) {
var layer = layers[l];
layer.locked = false;
layer.selected = false;
}
}
app.beginUndoGroup("Unlock All Layer(s)");
var project = app.project;
var items = project.items;
for (var i = project.numItems; i > 0; i--) {
var item = items[i];
if (item instanceof CompItem) {
unlockAllCompositionLayers(item);
}
}
app.endUndoGroup();
})();