• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Renaming layers during actions...

Community Beginner ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

So i have an action where in the middle of it, i want to rename a layer. Inserting a menu item doesn't allow me to choose Layer>Rename layer... And when I rename a layer while the action is recording by double clicking on it, the action records "Set Current Layer...". you can click on the dialog box icon beside "Set current layer" but that doesn't actually show a dialogue box to allow you to rename a layer. Can anyone help me please. I just want to rename layers in the middle of actions. I will be happy to provide screenshots and other information if necessary.

Views

4.5K

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 1 Correct answer

Community Expert , Jul 09, 2017 Jul 09, 2017

It is possible to do this only using actions without referencing a script, however it is a bit of a hack…

With the required layer targeted/highlighted by the preceding action step, the following commands can be added:

1) Insert menu command: Duplicate current layer

2) Record the selection of backward layer: OPT/ALT + [

3) Insert menu command: Delete current layer

4) Record the selection of forward layer: OPT/ALT + ]

rename-hack.png

When the action steps are run, the duplicate layer dialog will allow the user to renam

...

Votes

Translate

Translate
Adobe
Community Expert ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

save the below code as a text file with the extension .jsx. Put it in the Presets\Scripts folder of Photoshop. Add a step in your action, after the layer is selected, to play the script from the File>Scripts menu.

#target photoshop

var doc = activeDocument;

var pmt = prompt ('Type a new layer name', doc.activeLayer.name, 'Rename Layer');

doc.activeLayer.name = pmt;

Votes

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
Community Expert ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

Adobe must have “fixed things up”…

In CC 2017, the option to insert a menu command to rename a layer is grayed out:

rename.png

While CS6 teased you with the ability to add this command into an insert, however once the OK button was pressed nothing was actually inserted into the action!

CS6.png

Votes

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
Community Expert ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

It is possible to do this only using actions without referencing a script, however it is a bit of a hack…

With the required layer targeted/highlighted by the preceding action step, the following commands can be added:

1) Insert menu command: Duplicate current layer

2) Record the selection of backward layer: OPT/ALT + [

3) Insert menu command: Delete current layer

4) Record the selection of forward layer: OPT/ALT + ]

rename-hack.png

When the action steps are run, the duplicate layer dialog will allow the user to rename the layer. Then the original layer will be targeted and deleted and then the newly named layer will be targeted. A stop message with continue could be added if this was considered confusing (duplicate to rename), the obvious benefit of doing this with an action is that it is self contained/portable and does not rely on a script being installed… while the obvious benefit of using a script is that it is clear what is going on in the GUI.

action-result.png

Votes

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 10, 2017 Jul 10, 2017

Copy link to clipboard

Copied

for what reason you want rename the layer?
do you want rename it different at every execution? Such as FreqSep1, FreqSep2, for example?
if you have problems to access right layer by name in the action perhaps you can avoid this situation?

for example, if you want to do frequency separation, and you need in apply image select blurred layer - you should select the option  merged, without targeting specific layer, but opacity of your current layer should be 0 for the moment.
Or you have some different reason for renaming?

Votes

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
Community Beginner ,
Jul 10, 2017 Jul 10, 2017

Copy link to clipboard

Copied

LATEST

No I just want to rename the layer every time. Thank you for your help thought.

Votes

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