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

Action needs to apply to any number of layers

Explorer ,
Dec 04, 2023 Dec 04, 2023

Copy link to clipboard

Copied

Greetings,

 

I have an action that I’d like to see applied to my document's layers no matter how many layers are present in said document. The action goes as follows :

- Reorder the layers

- Lock the bottom layer

- Auto align the layers above that bottom/locked layer to that bottom/locked layer

- Make those freshly aligned layers invisible

 

I’ve already successfully created the action described above, for four layers. But I soon as the number of layers present in the document changes, the action goes out of whack and fails to work properly.

 

I’m pretty certain a scrip would allow me to apply the action described above to any number of layers, from two to 45 if need be. However, I can’t script or understand much about them!

 

Any help would be most welcomed.

Thank you.

TOPICS
Actions and scripting , macOS

Views

440

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

Community Expert , Dec 05, 2023 Dec 05, 2023

So it appears that the issue is with the multiple fixed/static steps to select the next layer (which only work for the required quantity of layers)...

 

You already have a relative step to select the back layer... So why not replace the multiple next layer steps with a single select forward layer and select front layer step from the layer above the back layer with continuous?

 

So, select forward layer, then select front layer continuous (shift modifier).

 

ALT/OPT ] (right square bracket)

ALT/O

...

Votes

Translate

Translate
Community Expert , Dec 05, 2023 Dec 05, 2023

 

Stephen_A_Marsh_0-1701771136079.png

 

 

Relative Selection Layer Keycuts:


Select/target front (top) layer =
Option + .

Select/target next layer up = Option + ]
Select/target next layer down = Option + [
Select/target back (bottom) layer = Option + ,

 

Relative Move Layer Keycuts:

 

Move current target layer to front (top) layer = Command + Shift + ]
Move current target layer up = Command + ]
Move current target layer down = Command + [
Move current target layer to back (bottom) layer = Command + Shift + [

 

Windows users would swap

...

Votes

Translate

Translate
Adobe
Community Expert ,
Dec 04, 2023 Dec 04, 2023

Copy link to clipboard

Copied

What exactly happens at the first step to reorder layers? 

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
Explorer ,
Dec 05, 2023 Dec 05, 2023

Copy link to clipboard

Copied

In Bridge:

1 - Open photos as a layers stack in Photoshop

In Photoshop :

2 – Reverse the layers stack order: see screen captures 01 (before) and 02 (after). My workflow requires this step.

3 – Lock the bottom layer to make it my default image for the next step, which is AutoAlign.

4 – Select the layers above the locked bottom layer and apply Auto-Align (Reposition) on them.

5 – Make those realigned top layers invisible. Keep the locked bottom layer visible.

Note: in the screen captures, you can also see the breakdown of the Action In recorded. It works exactly as I need it to, but stops giving be reliable results once the number of layers in my Photoshop project/document changes.

I hope this clarifies the workflow.

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 ,
Dec 05, 2023 Dec 05, 2023

Copy link to clipboard

Copied

So it appears that the issue is with the multiple fixed/static steps to select the next layer (which only work for the required quantity of layers)...

 

You already have a relative step to select the back layer... So why not replace the multiple next layer steps with a single select forward layer and select front layer step from the layer above the back layer with continuous?

 

So, select forward layer, then select front layer continuous (shift modifier).

 

ALT/OPT ] (right square bracket)

ALT/OPT SHIFT . (full point, period character)

 

A screenshot to illustrate, note that I have expanded the steps so that it is clear what is taking place:

 

2023-12-05_21-04-39.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 ,
Dec 05, 2023 Dec 05, 2023

Copy link to clipboard

Copied

 

Stephen_A_Marsh_0-1701771136079.png

 

 

Relative Selection Layer Keycuts:


Select/target front (top) layer =
Option + .

Select/target next layer up = Option + ]
Select/target next layer down = Option + [
Select/target back (bottom) layer = Option + ,

 

Relative Move Layer Keycuts:

 

Move current target layer to front (top) layer = Command + Shift + ]
Move current target layer up = Command + ]
Move current target layer down = Command + [
Move current target layer to back (bottom) layer = Command + Shift + [

 

Windows users would swap the Command key for Ctrl and the Option key for Alt

 

EDIT: 

Layer selection is dependent on layer visibility. To select invisible layers, takes a script or a bit more work with actions and visibility toggles:

 

relative-layers.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
Explorer ,
Dec 10, 2023 Dec 10, 2023

Copy link to clipboard

Copied

LATEST

Thank you.
This did it.

Now, if only Auto Align would work on its own. It's unreliable. Still better to do it by hand at this point.

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 ,
Dec 04, 2023 Dec 04, 2023

Copy link to clipboard

Copied

Could you please post screenshots taken at View > 100% with the pertinent Panels (Toolbar, Layers, Options Bar, …) visible? 

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
Explorer ,
Dec 05, 2023 Dec 05, 2023

Copy link to clipboard

Copied

Thanks for your reply.
Does this help ? You can see the ordered layers, and the action breakdown.

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