Skip to main content
Inspiring
January 9, 2019
질문

• "Filtering layers" isn't recorded in an "action"?

  • January 9, 2019
  • 4 답변들
  • 1255 조회

Hello -

I would like to create an action for a colleague of mine.

In the "process" I need to select ONLY the "smart object" layers.

To do this I'm using the filtering option in the "layers" palette.

Unfortunately it works perfectly manually, but t isn't not recorded into the action.

Is there another way to select only the "smart object" layers (with the possibility to record it in an action)?

Thank you,

- Dimitri

이 주제는 답변이 닫혔습니다.

4 답변

D Fosse
Community Expert
Community Expert
January 11, 2019

Not so sure this would work anyway. The layer name is what is recorded in the action, not layer type or any other attribute.

If names differ, the action just stops. The only relative layer selection allowed is counting up or down from the active layer.

That you can do it manually is no guarantee it will work in an action. You can think; the action doesn't.

Stephen Marsh
Community Expert
Community Expert
January 10, 2019

I wonder if there is a way to change the AM code below, perhaps the “undefined” bit?

var idlayersFiltered = stringIDToTypeID( "layersFiltered" );

executeAction( idlayersFiltered, undefined, DialogModes.NO );

Just like an action, the key bit is not recorded...

dimitri_cas작성자
Inspiring
January 11, 2019

Hello Stephen -

Thank you for your input…

Where do you put this piece of code? in the script of Lumigraphics?

Thank you again.

- Dimitri

Stephen Marsh
Community Expert
Community Expert
January 11, 2019

Sadly you can’t/don’t use the code, unless it can be modified (I was lamenting the fact that despite the smart object layer filter being recorded by ScriptListener, the AM code did not actually do anything).

Bojan Živković11378569
Community Expert
Community Expert
January 10, 2019

If your Smart Object layers are always in the same count and same naming convention or Smart Object layers are ordered one above another in the Layers panel then it can be done, otherwise if you want to use action in any document just to select all smart object layers regardless of their count, position, naming convention it cannot be done (recorded as action step) using filtering options in the Layers panel.

Legend
January 9, 2019

You can write a script to select Smart Object layers, and call that from an action.

dimitri_cas작성자
Inspiring
January 10, 2019

Hello Lumigraphics -

Thank you for your reply.

Now… hmmm I have no clue how to script that.

Any idea?

Thank you.

- Dimitri

Legend
January 10, 2019

Hello Lumigraphics -

W0W that's already pretty cool.

Now I see that it only select 1 smart object layer not ALL the smart object layers of the active document.

Is there a possibility to optimize the script (ie. that it select ALL the smart objects layers)?  If it isn't too much asking ;-)

Thank you already

- Dimitri


You may be able to change the script to select multiple layers at once. This is a chance to learn scripting I'm afraid I don't have time to work on it right now.

Adobe Photoshop CC SDK for developers | Adobe I/O