How to revise naming order.
howeller opened this issue · 4 comments
Love this script!
Could you advise on how swap the naming order to get "LayerComName_ArtboardName" ? I attempted to swap those, but get an _underscore inserted before the name.
Thanks!
He sorry for not replying sooner. This exporter does not export files using layernames. this exporter is for when you use Artboards and layercomps together in a single file. It can also do layercomps alone, but you need to convert the file to have 1 artboard. My version of the layercomps is more expanded then default Photoshop layercomps exporter.
But this script is not a layer exporter.
PS ive swapped out underscore for dash, using dash is better for editing. Though underscore is easier for reading. When you need to adjust names in those files, when it has dashes you can use shortcuts to jump between parts in the name. This does not work with underscore. Therefor i dont use this naming method since couple years.
Hi thank you for looking at this. I wasn't asking about using the Layer name, but including an option to place the "Layer Comp" name before the Art Board name in the export options. So you could export as "LayerComp1_Artboard1.jpg"
Thanks again!
Sorry i misunderstood the request. That can be done yes.you will need to swap the lines of code for that. I'll get back asap with the lines need to swap
You will need to swap line 2715 - 2727 out with the text below.
if (exportInfo.prefixIndex) {
if ((exportInfo.inclArtboardName) || (exportInfo.fileNamePrefix)) {
fileNameBody += "-";
}
fileNameBody += zeroSuppress(compsIndex, 4) + "-";
fileNameBody += compRef.name;
}
if (exportInfo.inclArtboardName) {
if (exportInfo.fileNamePrefix) {
fileNameBody += "-";
}
fileNameBody += abAr[artbrdIndex].name;
Make sure the insets are equal to the image below, otherwise it will returns errors and not run at all
Ive added the updated versions below, guess thats easier. Not this is version 128. Ive not uploaded these fixes yet. I noticed when i have just 1 artboard it would return an error. Ive fixed that last week.
LayerComps-Artboard-To-Files_v128-customnaming.zip