Skip to main content
konrad79
Inspiring
August 18, 2019
Answered

Apply filter (offset) to multiple layers at once

  • August 18, 2019
  • 4 replies
  • 10116 views

How can I apply a filter (e.g. offset) to multiple layers at once?

Multi select of layers or grouping them into a group don't work.

This topic has been closed for replies.
Correct answer Stephen Marsh

I think, scripting would be the only solution.

zenginejulia​ Actions wouldn't help, since my fastest method currently is to select a layer and use the STRG+ALT+F (Reapply Filter) short cut to each layer.

jane-e​ There is nothing I can drag&drop ... the offset filter is applied on the pixel based layer. I think, in PS for pixel layer there is nothing like a non-destructive effect or filter list like e.g. in Illustrator, where I can select/enable/copy single filter/effects, isn't it?


Have you looked at my replies #8 and #9?

There are some ready-made scripts to play an action to all selected layers, so all you need to do is record an action that has the offset values.

I have also posted a modified script based on some other similar topics that I linked to.

You should be all good to go!

4 replies

Stephen Marsh
Community Expert
August 18, 2019
Stephen Marsh
Community Expert
August 18, 2019

And some more:

Re: Possible to apply an action to each frame in a video footage??

https://raw.githubusercontent.com/Paul-Riggott/PS-Scripts/master/Run%20Action.jsx

Script I made: Iterate Action Over Layers

This one would need modifications, such as below:

#target photoshop

// To Do: Add a suspendHistory function

var originalRulerUnits = preferences.rulerUnits;

preferences.rulerUnits = Units.PIXELS;  

if(app.documents.length>0){

    var docRef = activeDocument;

    var layerNum = docRef.layers.length;

    for(var i=0;i<layerNum;i++){

        docRef.activeLayer = docRef.layers;

        if(!docRef.activeLayer.isBackgroundLayer){

            try{offSet ()}

            catch(e){}

            }

        }

    }

else{alert('There are no open files')};

function offSet(){

var docRef = app.activeDocument

var activeLayer = docRef.activeLayer

activeLayer.applyOffset (50, 50, OffsetUndefinedAreas.REPEATEDGEPIXELS); // Offset Filter Options

preferences.rulerUnits = originalRulerUnits; 

}

Chuck Uebele
Community Expert
August 18, 2019

Is there a reason you can't apply the filter individually to each layer? The filter allows you to type in an offset value.

konrad79
konrad79Author
Inspiring
August 18, 2019

I can apply the filter individually:

Select layer --> CTRL+ALT+F

Wait the filter to be applied

Select layer --> CTRL+ALT+F

Wait the filter to be applied

Select layer --> CTRL+ALT+F

Wait the filter to be applied

Select layer --> CTRL+ALT+F

Wait the filter to be applied

Select layer --> CTRL+ALT+F

Wait the filter to be applied
etc.
You see the problem for many layers ;-)
jane-e
Community Expert
August 19, 2019

konrad79  wrote

I can apply the filter individually:
  • Select layer --> CTRL+ALT+F
  • Wait the filter to be applied

Hi Konrad,

A little shorter:

  • Apply filter to first layer.
  • Option (Alt) + Drag filter to copy it to each remaining layer.

~ Jane

josephlavine
Community Expert
August 18, 2019

My favorite route would be to create a Smart Object of the group of layers or you might need to to a merge copy of them.

konrad79
konrad79Author
Inspiring
August 18, 2019

If I select 10 layers in multiselect and convert them to smart objects, they are combined into one single object/layer - ok, I can offset this one object but how can I re-convert the smart object(s) into the 10 plain layers?

I don't want to merge the layers into one. I want to offset a large number of layers all by the same numbers.

c.pfaffenbichler
Community Expert
August 18, 2019
I want to offset a large number of layers all by the same numbers.

At current one can’t apply a Filter to multiple Layers simultaneously on Photoshop.

A Scripting solution seems possible, though, but depending on the selected objects it may need to be a bit involved.

Is a Selection involved?

c.pfaffenbichler
Community Expert
August 18, 2019

You could convert them to a Smart Object.