Copy link to clipboard
Copied
Hi All
I'm hoping someone can help me with some automation. I have no real clue about scripting, I just know that clever things can be done, hopefully someone could point me in the right direction!
I'm superimposing some t-shirt designs onto images of blank t-shirts.
Each different colour T-shirt (15 colours) is on an individual layer, so I have 15 layers.
So to create 15 images of a given t-shirt design (one image for each colour shirt) I need to:
1) Import a design onto the top layer
2) Update all 15 layer comps
3) Hit the 'Layer Comps to Files' button
4) Put a unique identifier into the filename prefix field
5) Go to 1)
So I guess my question is this:
Can I automate any more of this? For example can I have the filename prefix pulled in from the Layer name? So I'd just name the top layer (with the design on) and PS would pull that layer name into the filename prefix field?
And can I update all those layer comps automatically (when I put the next design on) rather than selecting each one and updating manually?
Any help appreciated from a scripting novice!
Kind Regards
Mark
If you turn the top layer with the design into a smart layer then manually update the layer comps once and save the file as a template you can then use the menu item Layer-Smart Object-Replace Cotents... to change out the design in a way that would no longer require updating the layer comps. Changing the content of a smart object does not effect the layer comp status like adding a new layer would.
In the Layer Comps to Files.jsx if you find the line
var fileNameBody = exportInfo.fileNamePrefix;
and
...Copy link to clipboard
Copied
If you turn the top layer with the design into a smart layer then manually update the layer comps once and save the file as a template you can then use the menu item Layer-Smart Object-Replace Cotents... to change out the design in a way that would no longer require updating the layer comps. Changing the content of a smart object does not effect the layer comp status like adding a new layer would.
In the Layer Comps to Files.jsx if you find the line
var fileNameBody = exportInfo.fileNamePrefix;
and replace it with
var fileNameBody = app.activeDocument.layers[0].name;// top layer name
The script will no longer use the prefix from the dialog and instead use the top layer's name as the prefix.
To automate the whole process would require creating a custom script. The Layer Comps to Files script was not written to be called from another script.
Copy link to clipboard
Copied
Hey Michael
THats great, thank you very much for your help.
I may look at the fully automated script - please can you let me know your email address if you could write such a script?
Copy link to clipboard
Copied
Hey I came across this with a similar question. How can I make it the document name instead of the top layer name? I know this is old news, but I'd appreciate it!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more