Hello,
We have written an automation plugin that runs in Photoshop. Its main task is to iterate through each layer and perform a task on each layer. The task depends on the type of layer, e.g. image layer, text layer, smart layer, etc.
The plugin iterates through each layer by selecting it to make it the current layer (using eventSelect) and then performing the task. I noticed that while the plugin is running, it is possible for the user to click on a different layer in the Layers dialog. This changes what Photoshop considers the "current layer". Since the current layer is no longer what the plugin selected, subsequent operations can cause errors and unexpected results. This is essentially a race condition caused by the user interacting with the plugin's commands.
Is there a way to prevent Photoshop from accepting user input while the automation plugin is running?
I'd appreciate any suggestions on how to fix or workaround this. Thanks.