Skip to main content
Participant
March 23, 2016
Question

Filter and automation plug-in communication

  • March 23, 2016
  • 1 reply
  • 455 views

Hello

I'm working on making a filter and an automation plug-in and stuck in a problem.

1. automation plug-in dose a job saving document and calling a filter.

2. filter shows up a dialog, and calls automation plug-in when user click on OK button

I found out that event occurs after filter done it's finishing process.

filter:

  void DoFinish(void)

  {

  LockHandles();

  WriteScriptParameters();  

  WriteRegistryParameters();

  }

The listener, an automation plug-in catches the event filter made, and then reads the script parameters.

The problem is that:

The filter create an event when evoked from the menu,so automation plug-in catch that event and do the job.

But it does not make an event when evoked from automation plug-in, so automation plug-in  does nothing.

Is there any workaround or solution for this?

thx in advance,

Kim YK

This topic has been closed for replies.

1 reply

Tom Ruark
Inspiring
March 23, 2016

Can you clarify a few points?

1) Is your automation called via a menu or doing the "save and filter" via a listener entrypoint?

2) a filter cannot "call automation" so i'm guessing this "calls automation" is via a listener that the automation plugin made

Your "Play of filter" is returning a descriptor so you can see what the user did by examining the descriptor and call whatever routine your listener is doing.

The reason your automation plugin is not getting the filter event is that the filter event never happened. This is due to play levels inside of Photoshop. The easiest way is to see it via an action. If your action has three things in it. Make a layer, rename layer, make a selection. And you play that action. The "event" is "you just played an action." You do not see the three things itemized in your listener code. This is because those three events happened at a higher level.

You should be able to work around your issue via looking at the return descriptor of your play as described above.

The other option is to add a "listener" event while you are running your automation plug-in. This should register that listener at the higher level.