I 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.");
}