-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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."); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters