Skip to main content
Participant
April 19, 2024
Question

Is it possible to set up layer on and off in Photoshop action?

  • April 19, 2024
  • 4 replies
  • 311 views

*Please understand if the text is weird because we use a translator.

I'm working on changing the character's expression and saving it.
The order of the layers is
*Face 8
*Face 7
*Face 6
...
*Face 1
*IDLE

It's the order.

In this situation, I would like to create an action to save after ON and OFF for each facial expression layer.

To make it easier, the order of work

FACE1 LAYER ON -> 저장 -> FACE 1 LAYER OFF -> FACE 2 LAYER ON -> 저장 ...

This is how it goes.
In this case, how should I create an action?
And in case of SAVE AS COPY, it is saved in the action, but there is a problem of overlapping because the name of the file is duplicated.
I have to do quite a lot of these things, so I'd appreciate your help.

This topic has been closed for replies.

4 replies

Bojan Živković11378569
Community Expert
Community Expert
April 20, 2024

It is also possible to record an action to show or hide a layer. However, the issue arises when you cannot select a hidden layer using a keyboard shortcut. This method is preferred for recording steps in an action due to the flexibility it provides when playing the same action across different documents that may have a different layer naming convention but maintain the same layer order. If your documents always have the same layer order and naming convention, then you can record the action by clicking on the layer to select it and then show or hide it. This method records the layer's name as an absolute value, and the action will fail if the document does not have a layer with the exact same name.

 

"And in case of SAVE AS COPY, it is saved in the action, but there is a problem of overlapping because the name of the file is duplicated."

There are workarounds for this, such as saving in different folders or using Image Processor Pro. The best option, as already mentioned, is Layer Comps. I believe, without verifying, that an action can be recorded to create and save Layer Comps.

Stephen Marsh
Community Expert
Community Expert
April 20, 2024
quote
And in case of SAVE AS COPY, it is saved in the action, but there is a problem of overlapping because the name of the file is duplicated.

By @jg5235

 

 

The File > Automate > Batch command has a checkbox to:

 

"Override Action "Save As" Commands

Ensures that processed files are saved to the destination folder specified in the Batch command (or to their original folder if you chose Save and Close), with their original names or the names you specified in the File Naming section of the Batch dialog box.

If you don't select this option and your action includes a Save As command, your files will be saved into the folder specified by the Save As command in the action, instead of the folder specified in the Batch command. In addition, if you don't select this option and the Save As command in the action specifies a filename, the Batch command overwrites the same file (the file specified in the action) each time it processes an image."

 

https://helpx.adobe.com/photoshop/using/processing-batch-files.html#process_a_batch_of_files

 

EDIT: I'd just like to make it clear that this override checkbox is for batch processing multiple files, not layers. This is why you need a script to save the visible layers with a variable name, not an action/batch action.

Stephen Marsh
Community Expert
Community Expert
April 19, 2024

Another option is to create layer comps and use the layer comps to files script.

 

https://helpx.adobe.com/au/photoshop/using/layer-comps.html

 

Otherwise, a custom script would be required.

jg5235Author
Participant
April 20, 2024

Thank you. I tried to use the jsx file you told me, but the error message "javascript was missing" is output. I'm sorry, but could you help me a little more?

Stephen Marsh
Community Expert
Community Expert
April 20, 2024
quote

Thank you. I tried to use the jsx file you told me, but the error message "javascript was missing" is output. I'm sorry, but could you help me a little more?


By @jg5235


Which of the 3 scripts?

 

Wow did you save the code?

 

How did you run the script?