-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathRemove All Rulers.jsx
More file actions
41 lines (34 loc) · 894 Bytes
/
Remove All Rulers.jsx
File metadata and controls
41 lines (34 loc) · 894 Bytes
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
/**
* Removes every guide ruler from every item in the project.
*
* @author Zack Lovatt <zack@lova.tt>
* @version 0.1.0
*/
(function removeAllRulers() {
if (parseFloat(app.version) < 16.1) {
alert("This script requires AE 16.1 or newer to run!");
return;
}
var items = app.project.items;
var sum = 0;
app.beginUndoGroup("Remove All Rulers");
try {
for (var ii = 1, il = items.length; ii <= il; ii++) {
var item = items[ii];
var numGuides = item.guides.length;
if (!item.guides || numGuides == 0) {
continue;
}
writeLn("Processing " + item.name + " (" + numGuides + ")");
while (item.guides.length > 0) {
item.removeGuide(0);
sum++;
}
}
} catch (e) {
alert(e, "Remove All Rulers");
} finally {
app.endUndoGroup();
}
writeLn("Removed " + sum.toString() + " rulers.");
})();