After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 773796 - Ability to Undo/Redo in a Script
Ability to Undo/Redo in a Script
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: Script-Fu
unspecified
Other All
: Normal enhancement
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2016-11-01 23:38 UTC by jrya12
Modified: 2018-05-24 17:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description jrya12 2016-11-01 23:38:04 UTC
Right now in Python & Scheme scripting you can freeze/thaw, disable/enable, and group the undo history. However, despite all of this there's no way to actually navigate the undo history.

Example:
Say I made a Python plugin that moves some layers around on the canvas. If I wanted to revert the movement for whatever reason, I'd have to move all of the layers a second time in reverse, which is not only messy, but lossy if interpolation was used somewhere (like rotation).
It'd be much better to simply type image.undo() (or use the PDB function), like how you can already type image.undo_freeze() and such.
Comment 1 Jehan 2016-11-03 14:37:57 UTC
Looks to me like having some undo/redo functions in our API (and even functions for "viewing" the history) would be useful indeed. There are use cases.

That should also not be too hard to implement, so I set the "newcomers" keyword.
Comment 2 Rahul Rajavel 2017-01-07 01:55:56 UTC
Hi,

I would like to help with this. Is this still available and if so, is there a good starting point to go from?

Thank you
Comment 3 Jehan 2017-01-07 13:02:22 UTC
Hello Rahul,

Yes this is still not implemented.
I'd say that the first step would be to check up with us on IRC, just to be sure. Personally I think this could be useful, but I think there was at least one person who doubted the usefulness of such an API.

Technically, just grep in our code to find our undo internal API, and then just make this available under libgimp/. I see we already have a `libgimp/gimpimageundo_pdb.c` (where we can do undo groups, freeze and thaw the undo, etc.). I guess a new undo-related function could go in there.
Comment 4 GNOME Infrastructure Team 2018-05-24 17:08:23 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/999.