I’m writing a plugin that makes a few little changes to several layers in each of several documents. As a result the document display flashes and jumps in a very annoying way for a few seconds. Is there any way to turn off the document refresh, or just to limit which events it responds to?
Both the document itself and all the background of the pasteboard flash (I usually run in dark mode and it switches between that and white).
FWIW, I’ve tried:
-
making the changes in a document created with core.createTemporaryDocument. The description does say “This document does not appear in the UI, and there are limitations with some editing features.” I have yet to figure out what you can actually do with one; most of the Document object returned is empty, not even access to its layers property.
-
fiddling with the action playback options, because there are some threads around that say that could help in similar situations with ExtendScript. I can’t see any effect on UXP and BatchPlay.
-
I looked for a way to zoom right out or right in on a document to reduce the visual impact of refreshes, but couldn’t find one.
-
I tried core.redrawDocument at strategic moments, but couldn’t see any difference.
Chunks of the work are done with batchPlay, but I’ve steered clear of chaining batchPlay calls into one because there seem to be enough comments about problems with that!
FWIW, I do suspend history on each doc as I work on it, but that doesn’t seem to have any impact on redraw frequency.
Any other thoughts?