Forums › Adobe After Effects › Making a standard set of rulers?
Making a standard set of rulers?
Eric Chard
March 2, 2021 at 7:03 pmMaking a standard set of rulers?
I’d like the capability to create with one keystroke (launch a script) my own custom set of rulers created. Like, “Borders 10 pixels inside the comp, plus center X and Y rulers”.
Is that possible? Has someone already done it?
Walter Soyka
March 2, 2021 at 9:44 pmVery possible! Here’s the code for a script to do exactly as you describe. Let me know if you have any questions.
app.beginUndoGroup("Create guides");
var HORIZONTAL_GUIDE = 0;
var VERTICAL_GUIDE = 1;
app.project.activeItem.addGuide(HORIZONTAL_GUIDE, 10);
app.project.activeItem.addGuide(HORIZONTAL_GUIDE, app.project.activeItem.height - 10);
app.project.activeItem.addGuide(HORIZONTAL_GUIDE, app.project.activeItem.height / 2);
app.project.activeItem.addGuide(VERTICAL_GUIDE, 10);
app.project.activeItem.addGuide(VERTICAL_GUIDE, app.project.activeItem.width - 10);
app.project.activeItem.addGuide(VERTICAL_GUIDE, app.project.activeItem.width / 2);
app.endUndoGroup();
Walter Soyka
March 2, 2021 at 9:45 pmOh, and Adobe quietly added a feature to export and import guides a few releases ago. These features are available through the View menu.
Eric Chard
March 5, 2021 at 4:04 amThank you very much!
Log in to reply.