On a related note to this thread, I was wondering if there was any way
to have a script "perform" an Undo or to go back a few steps in the Undo
I have a script which chops a layer up into multiple pieces and the
result is a layer that is centered relative to the original layer. In
many situations, it would be desirable to have the generated layer
aligned to the corners of the original layer. I had considered
performing the additional alignment steps and then the user could
perform UNDOs until he achieved the alignment he desired, but this would
make it very tedious (and unintuitive) to perform an actual UNDO.
However, if I could perform the four alignments in the script and
subsequently set the UNDO history back to the "centered" result, then
the user could perform REDOs to attain his alignment while retaining the
intuitive, one-step UNDO (or alternately, just continue with his editing).
I am unaware of any PDB function that would permit and would be
interested in any input as to how this might be accomplished --
including which code in the core I might avail if I were to create such
a PDB function.
"It is amazing what you can accomplish if you do
not care who gets the credit." -- Harry S. Truman
Gimp-developer mailing list