-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathISO_RemoveEffectsViaDisable.jsx
More file actions
67 lines (49 loc) · 1.84 KB
/
Copy pathISO_RemoveEffectsViaDisable.jsx
File metadata and controls
67 lines (49 loc) · 1.84 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// ISO_RemoveEffectsViaDisable.jsx
// Artist: https://www.jasonfletcher.info/
// Code generated by ChatGPT-5.5
// Date: June 9, 2026
// Description: This After Effects script will disable all effects on all layers within selected comps. Effects inside nested comps are unaffected. This operation will be executed for the selected comps in the Project window.
(function () {
app.beginUndoGroup("Disable All Effects In Selected Comps");
var selectedItems = app.project.selection;
if (selectedItems.length === 0) {
alert("Please select one or more comps in the Project panel.");
app.endUndoGroup();
return;
}
var compCount = 0;
var layerCount = 0;
var effectCount = 0;
for (var i = 0; i < selectedItems.length; i++) {
if (!(selectedItems[i] instanceof CompItem)) {
continue;
}
var comp = selectedItems[i];
compCount++;
for (var l = 1; l <= comp.numLayers; l++) {
var layer = comp.layer(l);
layerCount++;
var effects = layer.property("ADBE Effect Parade");
if (effects !== null) {
for (var e = 1; e <= effects.numProperties; e++) {
var effect = effects.property(e);
try {
if (effect.enabled) {
effect.enabled = false;
}
effectCount++;
} catch (err) {
// Some effects may not expose the enabled property.
// Ignore and continue.
}
}
}
}
}
alert(
"Comps processed: " + compCount + "\n" +
"Layers processed: " + layerCount + "\n" +
"Effects disabled: " + effectCount
);
app.endUndoGroup();
})();