Copy link to clipboard
Copied
hi
wondering if there might be a way to have Photoshop detect whenever the active layer has changed. (In other words, I switched from Layer3 to Layer2). I'm guessing that the script would need to be 'live' and always monitoring Photoshop for the layer change.
Would this have something to do with the Event Handler Notifier?
Thank you
Copy link to clipboard
Copied
Yes, you will need notifiers. Depneding on how inclusive you want to be you may need quite a few. There are many things that can change the activeLayer. Select, Make, and Delete are just some of the events that can cause a change..
You also need to be able touse Action Manager to set-up and catch the events.
Copy link to clipboard
Copied
will this involve complex scripting, or does it have more to do with using features already included with photoshop (actions panel, etc). I will be experimenting for a way to detect a layer change no matter how or why it changed (via keyboard shortcut, clicking on the layers panel, via another script, delete layer, add new layer, etc - the only thing it would detect is that a new layer has become active, regardless of how)
basically the reason i'm asking is that i work with images that have many layers, and each layer is dedicated to certain aspects of my illustration (one layer is for the linework, another layer is for the color, another for the shadows, etc). I find myself *very often* drawing on the wrong layer, and then catching myself, then having to go through a hundred or more 'step back' states to fix it. So every time I change a layer, I'm going to develop a way to alert me, just so I don't fall into this trap. As you've already seen I have all sorts of modifications running on my system ,and this will be the next one - I'm going to find a way to detect a layer change, then copy the new layer name to the clipboard (via a scriopt that you have already provided and that I use *all* the time), then reproduce that layer name in a tooltip which will show consitently at the mouse cursor - meaning that at all times, I'll have a tooltip visible that is displaying the current layer I'm on (this last step is acheived through AutoHotKey), and is more specifically for fullscreen mode where I can't see the layers panel- the tooltip will still show me what layer I'm on, fullscreen or not.
to get started, how do I develop the notifers... Is it strictly javascripting or is there an extension panel/external software of some sort that has a graphical interface to work with?
Copy link to clipboard
Copied
actually i'm getting closer already
I went into the Script Events Manager and it doesnt look too complicated... I've added a new 'Photoshop Event' and named it 'Detect Layer Change'... but the pull-down arrow beside it doesn't have an option for something like that (it's just 'Start Application', 'new document', 'open document', etc - how do I add to that list something like 'detect layer change')
I can see that after I've installed the accurate event, that I can then decide whether it will run a script or carry out an action, which seems straightforward.