Skip to main content
Known Participant
September 6, 2012
Question

Getting the last settings of a filter

  • September 6, 2012
  • 2 replies
  • 1355 views

When you run a filter with executeAction you need to provide an ActionDescriptor. If this ActionDescriptor does not contain any filter parameters, then the default filter parameters are used when the filter is executed. I would like to provide an ActionDescriptor that contains the last used parameters of a certain filter.

Is it possible to retrieve the last used parameters of any filter somehow? If it possibe to get an ActionDescriptor containing these parameters with executeActionGet, how do I do it exactly?

Or is my only choice to save the ActionDescriptor that is returned by executeAction to a file? And then open it again and supply it to executeAction when running the same filter again?

When you manually run a filter from the Filter menu, Photoshop provides the last used parameters to the filter, so it should be possible somehow. The question is if it is possible to access that information through scripting.

Thanks for your help.

This topic has been closed for replies.

2 replies

DBarranca
Legend
September 13, 2012

I've been asking something along those lines here, it may be helpful too.

Davide

Known Participant
September 13, 2012

Thanks, Davide. Maybe I will need the event stuff for another task.

Harry

Tom Ruark
Inspiring
September 7, 2012

Let me see if I have this correct. For example, you want to use the last value used from say Gaussian Blur and use that number in your filter or action?

If that is correct, you would need to set up a listener for the Guassian Blur event and pull apart that descriptor to get the value when it is executed. Store it off somewhere and use it when your filter or script gets executed.

Known Participant
September 7, 2012

Actually what I want to know: Is it possible to run a filter from a script and make it display its last used settings? And is it possible to do that without having to store and retrieve these settings from a previous execution of the filter?

As far as I can see you can only run a filter from a script

1. with settings of your own (by supplying them with an ActionDescriptor)

2. with its default settings (by supplying no settings in the ActionDescriptor)

It would be great if you could run a filter with its last used settings from a script without using a tedious workaround. If that is not possible the easy way, I will have to store these settings after a filter is executed and retireve and supply them when the filter is executed again.

When restarting Photoshop the last used settings of a filter, e.g. Gaussian Blur, are retained. So I guess they are stored somewhere, probably in the Photoshop Prefs file. So maybe they can be found by searching that file, but I would rather want to avoid that.

Paul Riggott
Inspiring
September 7, 2012