Skip to content

Commit

Permalink
Add 'Remove All Rulers'
Browse files Browse the repository at this point in the history
  • Loading branch information
zlovatt committed Oct 12, 2023
1 parent a74406e commit 0b4cdb5
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
41 changes: 41 additions & 0 deletions Remove All Rulers.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* Removes every guide ruler from every item in the project.
*
* @author Zack Lovatt <[email protected]>
* @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.");
})();
19 changes: 19 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,25 @@ Recursively enable motion blur on selected comps, including all layers & precomp

---

<div>
<div>
<div>
<div>

#### [Remove All Rulers](<https://raw.githubusercontent.com/zlovatt/zl_Scriptlets/master/Remove All Rulers.jsx>)

</div>
<div>

Removes every guide ruler from every item in the project.

</div>
</div>
</div>
</div>

---

<div>
<div>
<div>
Expand Down

0 comments on commit 0b4cdb5

Please sign in to comment.