Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Question about layers.

New Here ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

Video 2021-07-14 20 50 14.mov 

 

Hello,

I made an action script to run repetitive job in photoshop. I included a link to the video I shot to better explain my situation.

 

The action script resize an image and transfer the image to a template. When the image is transferred to the template, normally it starts with "Layer 1" and 2 and 3 and so on. But this time, the layer name will jump to 500 then layer 501 and layer 502 and so on. It seems that it counted all the content in that template even though each item in that layer template has been rename. 

Please advise.

 

Thank you

TOPICS
Actions and scripting

Views

183

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Adobe Community Professional , Jul 14, 2021 Jul 14, 2021
What do you mean when you say "transfer the image to a template"? Why weren't the commands shown in your action? If this is a simple copy of a layer, then you should have given a name to the copied layer in your action, and not have suggested to do it automatically for photoshop. Advice - video must be recorded using any screen capture program.

Likes

Translate

Translate
Adobe Community Professional , Jul 15, 2021 Jul 15, 2021
I am not aware of feature in preferences. It may count all layers created in particular session, for example, and still there isn't any option, as far as I know, to instruct it otherwise.

Likes

Translate

Translate
Adobe Community Professional ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

Is there a Layer named »Layer 501« somewhere in the file? 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

Hello,

Thank you for the reply Thetr is no layer 500 inside the file. All the content inside the file is named. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

Actions are not Scripts they can not use logic so action are quite limited  compared with Scripts.  Action have a difficult dealing with some things and wind up building in document dependencies.   It sounds like your actions are depending on  layer name or Photoshop generating  particular and you actions target layers by name.   It is much better to record actions that do not have  layer name dependencies.  Actions should address layers relatively when possible.  Those actions will not have a dependency on a layer's name and work better. A document can  have many layer  with the name "Layer 1"  Layer name need not be unique in a document.   If an Action select "Layer 1" and the document has 100 layers with the name "Layer 1" which of the 100 "Layer 1" will Photoshop target.

 

Crafting Actions Package UPDATED Aug 10, 2014 Added Conditional Action steps to Action Palette Tips.
Contains

Example
Download

JJMack

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

I think @c.pfaffenbichler is on point, I can recreate your issue by naming the only layer in the document to Layer 501. The next created layer is automatically named Layer 502.

 

If you can not find any layer named Layer 501 (try to search for layer name from the Layers panel search feature) then try with preference reset what is general advice for all things weird in Photoshop.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

Looking at you video it look like you are playing action the create new document and having Photoshop add a layer and Photoshop Names  the layer Layer 1 in the new document.    When Photoshop add a layer Photoshop will generated a layer name  that is "Layer Sequence Number"   When you copy a layer the new layer name will be named  ' "LayerName" copy sequece number '   In you layered  document it look like copied its layer 1 twice in the mockup group add a layer Photoshop named  Layers 2 then added  more layers   and photoshop add Layer 502 and Layer 503 not Layer 3 and Layer 4 you were expecting.  Perhaps Photoshop Preferences were corrupted. Which mess up Photoshop added Layer sequence number for that document.  I do not how Photoshop manage added layer sequence number.  Try resetting you preferences

 

Your video fail to show the action palette so we have no  idea of what select step failed. My guess the step would be Select "Layer 3" and there is no Layer 3 in any of the documents layer groups. Photoshop did not name the layer what you action depends on it namings the layer "Layer 3". If the action was recorder the address the layer relatively the action would work no matter what photoshop named the layer.

JJMack

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

Hello,

Thank you for your reply. 

I think the only solution to this is not to depend on Photoshop to generate the layer name. But, I am still confuse why the file that i have been using for few years suddenly will not work with the action script.

 

I own a t-shirt store and I made t-shirt template file. When I have a new t-shirt design, I will add that new design using action script to transfer the design into the file.

 

The action script is very repetitive. It will resize the design, copy, select the next file and paste. It will repeat the step above 5 times before it complete the action script. 

Inside the file, everything is named. So, the first file should have been layer 1, then layer 2 and so on. I rely on photoshop to generate the name because it works all this time. But I will rename each file to avoid this issue. But it has not solve the issue why it won't work this time. You mention t should reset the preference. I will do so later.

 

The photoshop is freshly install copy on a new computer. 

Yukako

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

Action Script was a flash thing flash is dead.  Photoshop Has two automation  feature is  Photoshop Actions,  The Action plaette.  It reocord edits and Pays Actions.   Actions ars a sequebces of Photoshop stpes, A fixed sequences of steps that have fixed step settings no logic.   Photoshop's other Automation Feature is Photoshop Scripting.  Scripting is Programming you use logic to perform  the requires processing   depending one what the script see need to be done. Script can use logic

 

Scripting is harder than recording actions it requires  requires programming skill and Photoshop knowledge Adobe provide Scripts for user to use without needing to program them. Script can use action and actions can user scripts,

 

You may have use some from Photoshop menus.  Load file into a stack, Photomerge, Merger to HDR   Contact sheet etc.  Menu File>Scripts>Image Processor... it can iinclude action you create in its processing.

 

It is very easy to create simple T-shirt templates that have smart object layer on top the will be replaced for T-shirt element like fabric, Labels, Logo etc,   A script can batch populate simple template with replacement objects. You just need to setup folders that contain  your mockup templates and replacement objects.

 

Capture.jpg

JJMack

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 15, 2021 Jul 15, 2021

Copy link to clipboard

Copied

Hello,
In Photoshop, if you copy and paste an image to a template, the "layer" count will start with "Layer 1" for the first image you posted. I think Photoshop might include a feature that I might have accidentally activate. Instead of layer 1, it will generate a layer name base on the order of the image pasted inside that template.

 

Let say there are 200 images inside that template, and all of them are already named. The correct way should start with "Layer 1" when I added a new image to that template. But what if they count all those 200 images in that template first, and the new image would be "layer 201" generated by photoshop, is there any way to revert to generate layer 1 name again?

 

I had solved this issue by naming the layer instead of letting Photoshop generate a layer name. I notice it's generating Layer 700 now. So, I think they counted all the pictures number inside that template and generate a name based on the number of images inside that template. I just want it to go back like before and generate layer 1 instead of counting all the files.

 

Please advise,

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 15, 2021 Jul 15, 2021

Copy link to clipboard

Copied

  1. I am not aware of feature in preferences. It may count all layers created in particular session, for example, and still there isn't any option, as far as I know, to instruct it otherwise.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

What do you mean when you say "transfer the image to a template"?

Why weren't the commands shown in your action?

If this is a simple copy of a layer, then you should have given a name to the copied layer in your action, and not have suggested to do it automatically for photoshop.

 

Advice - video must be recorded using any screen capture program.

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

Thank you for your guidance. I made a new action and name the layer instead of leaving it to photoshop to generate the layer name. It works flawlessly!


I must add that I had been using old photoshop cs5 and it works fine by letting photoshop generate the layer name each time I made an action to copy and paste. I run into this issue after I install the newest photoshop. Perhaps there are changes in the new photoshop?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 15, 2021 Jul 15, 2021

Copy link to clipboard

Copied

LATEST

If you don't mind, then you could upload (attach) your template file here. You can change the file resolution to 1x1 px. Maybe then we could find the reason for your failure. It’s interesting. I cannot reproduce.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines