Skip to main content
Davide_Barranca12040269
Legend
October 3, 2017
Answered

[PS] Layer change event?

  • October 3, 2017
  • 1 reply
  • 920 views

Hi,

I'm perhaps missing something obvious here (CEP has this excellent built-in "fog" feature able to confuse everyone), but... is there a CEP event in Photoshop for "Layer Change" — i.e. that fires when the user selects a different Layer in the Layers Palette?

I wouldn't resort to JSX Notifiers, because there's no Panel on-quit event either so I'm not able to disable them when the panel is closed, AFAIK.

So far I'm using documentAfterActivate, but I'd really need something on Layer basis. Thank you!

Davide

This topic has been closed for replies.
Correct answer Davide_Barranca12040269

Reading my own book (reason #1 one writes a book: to search things one once knew), I could use a PhotosohpJSONCallback and listen for a "slct" event of class layer...

1 reply

Trevor:
Legend
October 3, 2017

Hi Davide

No idea about phoshop events but and you can look things up just as well as me but surely there's a change of selection event from the cep side which you can use to see if there's been a change in layer. I shouln't be overly resource intensive if there's no better option.

The other choice is just to not worry about the jsx engine pining the js engine after it's died

HTH

Trevor

Davide_Barranca12040269
Davide_Barranca12040269AuthorCorrect answer
Legend
October 3, 2017

Reading my own book (reason #1 one writes a book: to search things one once knew), I could use a PhotosohpJSONCallback and listen for a "slct" event of class layer...

Davide Barranca - PS developer and authorwww.ps-scripting.com