I just tried disabling the home screen manually, and it does look as if you need to restart Photoshop. When I turned it off and on around my code with batchPlay it had no effect. Shame, because it did make a small improvement.
I’m seeing that there are a lot of factors that have an impact; making sure that the history and layers palettes aren’t showing improves things a little bit as well.
The biggest improvement comes from setting up with all windows arranged as, for example, “tile all vertically”. If I do that then only one of those tiles flickers at a time, which is much less annoying.
But although I could see the commands to do that through Alchemist*, if I try to call them in my code I get “must be in modal execution” if it’s outside, and “command not currently available” if it’s inside the modal scope. I did try putting each of those batchPlay calls into its own modal execution context, before and after the one that encapsulates most of the code, but still get “command not available”.
const bpres = await batchPlay([{
_obj: "invokeCommand",
commandID: 5933,
kcanDispatchWhileModal: true,
_options: {
dialogOptions: "dontDisplay",
modalBehavior: "execute"
}
}
], {});
But then I tried the same thing using core.performMenuCommand, and that works!
I had been starting to wonder if I would have to put a warning on my plugin description with a list of mitigations that anyone who is sensitive to flashing lights can do when using it. But this looks like a good workround.
Now, I wonder how I can discover the initial arrangement that the user has set up so I can restore that at the end instead of just consolidating to tabs …
But that will have to wait till later
Martin
- I’m not sure if I offered my deep thanks for Alchemist; I don’t think I could put together a plugin that does useful things without it!