No - the current PDB API + some extras in the Python bindings cannot "see"
what the user
is doing with any tool. Nor is anything related to the undo history exposed
for plug-ins.
Your described work around sounds like the only thing possible.
You might want to try "pyautogui" module to check for mouse-click/movements
timing, as it might be more performant than checking for differences in the
image.
Regards,
joao
On Wed, 27 Mar 2019 at 15:12, Paul Jewell via gimp-developer-list <
gimp-developer-list@gnome.org> wrote:
> Hey all. I have been writing small plugins using the python engine for
> quite a while, it is very nice and I appreciate the great batch
> functionality available.
>
> I am interested in writing some functionality that deals with working with
> the last brushstroke. Ideally, I would be able to enable my plugin and it
> applies to all brush strokes (individually) until I turn it off, but I
> would also settle for just running it with a hotkey after making a stroke.
> I know these states must be stored somewhere because they are in the undo
> history. So far the only equivalent I have been able to come up with is to
> run a background thread that iterated over the canvas repeatedly to check
> if there are any deltas, and wait until no more are found, but obviously
> this is inefficient and inaccurate. Is there a better way available
> currently?
>
> I am usually using python-fu style but I have also used the scheme engine
> for a few projects.
>
> Thanks for your help.
> ___
> gimp-developer-list mailing list
> List address:gimp-developer-list@gnome.org
> List membership:
> https://mail.gnome.org/mailman/listinfo/gimp-developer-list
> List archives: https://mail.gnome.org/archives/gimp-developer-list
>
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives: https://mail.gnome.org/archives/gimp-developer-list