No, there isn’t.
[EDIT: Unless it can be done via Scripting…never explored that possibility]
Yes, you can accomplish this via scripting. Try this:
main();
function main()
{
var layerName = prompt("Please enter a layer name.");
if (layerName)
{
var doc = app.activeDocument;
var layers = doc.layers;
for (var i = 0; i < layers.length; i++) { var layer = layers[i]; var layerVisible = layer.visible;
layer.name = layerName;
layer.visible = layerVisible;
}
}
}
Trevor:
Is this JavaScript code? If so, I’m getting an error ("Error 24: Prompt is not a function.") on this statement:
var layerName = prompt("Please enter a layer name.");
tia…
~Danny~
Danny,
What version of PS are you using? The script was written for PS CS.
Thanks Trevor. Using CS. But that looks like a C++ snippet to me! What do I do with it? Compile it or what? I’ve no idea how I’d implement it.
By the looks of that script, it’s not quite what I meant. What I want to do is open a Photoshop Document with a set of arbritarily named layers, and then rename them all with generic layer1, layer2 etc
Jason,
The script is simple Javascript. Save the file as RenameLayers.js (or whatever), place it in your Presets/Scripts folder (located inside the Photoshop CS install folder) and then select it from File, Scripts, RenameLayers.js
As for modifying the script, have a read through the Documents in the Scripting Guides folder (located inside the Photoshop CS install folder) for instructions on how to write scripts. There are plenty of examples included and there is even a dedicated forum group for PS Scripting.
Hope that helps.
Many thanks for the help. This is new and interesting stuff for me.