Re: [Gegl-developer] enable a GEGL graph evolution log


On Sat, Sep 24, 2016 at 07:23:30PM +0200, Jon Nordby wrote:
On 10 September 2016 at 23:12, Philip R. Dutton
<fooledbyprimes gmail com> wrote:
I ran across much talk and some implementation of GEGL.  I can see how the
Undo /History features would make great use of the DAG graph data structure
used by GEGL.

Q: How hard will it be to log the GEGL graph evolution to disk in real-time
using perhaps a rolling log?   What is the best approach for an idea like

For the approach, pippin and I sketched together a basic spec a couple
of years back.


*However*, I believe the GEGL graphs used in GIMP are still "short
lived" - used for the duration of one operation and then applied
destructively. Meaning that there is no one graph which represents the
entire document and thus the evolution of your artwork.
It may be possible to try to stich together a sort of journal from all
these , but probably there would be need for a significant amount of
GIMP specific logic in addition... Not sure of the feasibility here.

Other than what Jon already said, I wanted to point out that if you
ran gnome-photos [*] with G_MESSAGES_DEBUG=all and
GNOME_PHOTOS_DEBUG=gegl, then it logs an XML representation of the
graph whenever something causes it to change. The final graph is
stored persistently (as XML) in ~/.local/share/gnome-photos.

Since the editing UI is relatively simple compared to GIMP, we use
snapshots to undo a whole series of operations, instead of undoing
every single change in the properties. I think this is similar to
transactions in Jon's references. The snapshots are again just XML
in memory.

All this is pretty straightforward in gnome-photos, because, unlike
current GIMP versions, it is structured for non-destructive editing.


[*] You'd need at least version 3.20.x.

Attachment: pgpLySF4RbQHv.pgp
Description: PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]