Sign up now! · Forgot password?
RSS/Atom feed Twitter

Editing last stroke / modification through gimp plugins

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Editing last stroke / modification through gimp plugins Paul Jewell via gimp-developer-list 11 Feb 00:33
  Editing last stroke / modification through gimp plugins Joao S. O. Bueno via gimp-developer-list 27 Mar 18:42
Paul Jewell via gimp-developer-list
2019-02-11 00:33:01 UTC (2 months ago)

Editing last stroke / modification through gimp plugins

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.

Joao S. O. Bueno via gimp-developer-list
2019-03-27 18:42:30 UTC (30 days ago)

Editing last stroke / modification through gimp plugins

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