Activity › Forums › Adobe After Effects › Guide Layer from project panel?
-
Guide Layer from project panel?
Posted by Max Haller on January 2, 2023 at 8:05 pmHey Guys
Wondering if there’s anyway/ plugin that lets me set a layer to always be a guide layer without the need for me to enable it in every comp. I need to use a text safe overlay in many graphics, and it’s so annoying to realise i didn’t hit the guide layer button after it renders. Normally i set it to be a guide layer in the first comp, and then copy paste it with that enabled into the other comps. But it would be great if i could set it to permanently be a guide layer from the project panel. Sort of like how you can rename layers on a per comp basis, or rename them in the project panel on a project wide basis. Anyway to do something like that for Guide Layers?
Thanks!
Max Haller replied 3 years, 3 months ago 3 Members · 4 Replies -
4 Replies
-
Graham Quince
January 3, 2023 at 8:33 pmNot that I’m aware of, but if you copy and paste your guide layer from one comp to another, it’ll stay as a guide layer.
Have you considered using the built-in text safe area and adjusting the margins in Preferences > Grid & Guides?
-
Max Haller
January 3, 2023 at 8:37 pmThanks Graham, the copy and paste method is how i normally do it currently. I would use the built in guide except its a slightly different safe area for some of the networks. Some have a lot less space than others or big bug safe areas i have to avoid so that’s why i rely on their overlay. Appreciate your answer though!
-
Walter Soyka
January 3, 2023 at 9:31 pmI wrote a quick little script to set every layer instance of the selected project items as guide layers. Save this as a JSX file, install in your scripts folder, and off you go.
Please note, this will NOT work exactly as you want (although your idea would make a great feature request). It will only affect layers that already exist in the project; new layers made from the project item will NOT automatically be guide layers; you’ll have to run the script again. But at least you can rest assured that if you run this before you render, your guides will be set as such.
// keen-GuideItems.jsx
// this script takes the the project selection, searches each comp for layers sourced from those item(s), and sets them as guide layers (if needed).
var selectedItems = app.project.selection.length > 0 ? app.project.selection : null;
if (selectedItems != null) {
// we always set an undo to be nice to our users
app.beginUndoGroup("Guide item");
// we'll want to track what we do so we can report back to our users
var setGuideLayerCount = 0;
var affectedCompList = [];
// for each item selected in the project panel...
for (var selectedItemsIndex = 0; selectedItemsIndex < selectedItems.length; selectedItemsIndex++) {
currentItem = selectedItems[selectedItemsIndex];
// we'll step through every comp in the project...
for (var projectItemIndex = 1; projectItemIndex <= app.project.numItems; projectItemIndex++) {
if (app.project.item(projectItemIndex) instanceof CompItem) {
var currentComp = app.project.item(projectItemIndex);
// and look at every layer to see if they match our selected source layer
for (var compLayerIndex = 1; compLayerIndex <= currentComp.numLayers; compLayerIndex++) {
var currentLayer = currentComp.layer(compLayerIndex);
// and for any layers that do match and are not already guide layers, set them as guide layers
// increment the guide layer count, and push the comp onto the list of affected comps
if ( (currentLayer.source == currentItem) && (currentLayer.guideLayer == false) ) {
currentComp.layer(compLayerIndex).guideLayer = true;
setGuideLayerCount++;
affectedCompList.push(currentComp);
}
}
}
}
}
// remove duplicate comps from our list of affected comps
for (var compListIndex = affectedCompList.length; compListIndex > 0; compListIndex--) {
if (affectedCompList[compListIndex] == affectedCompList[compListIndex-1]) {
affectedCompList.splice(compListIndex, 1);
}
}
// summarize the changes in the Info panel
writeLn("Set " + setGuideLayerCount + " guide layer" + (setGuideLayerCount == 1 ? "" : "s") + " in " + affectedCompList.length + " comp" + (affectedCompList.length == 1 ? "" : "s") + ".");
// that's all, folks. wrap up the undo
app.endUndoGroup();
} else {
alert("No items selected. This script search each comp in the project for layers from the first selected project item and set them as guide layers.");
} -
Max Haller
January 17, 2023 at 5:18 pmWalter you never cease to amaze! Thank you very much ill try this script
Reply to this Discussion! Login or Sign Up