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

2016-09-26 Thread Debarshi Ray
Hey,

On Sat, Sep 24, 2016 at 07:23:30PM +0200, Jon Nordby wrote:
> On 10 September 2016 at 23:12, Philip R. Dutton
>  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
> > this?
> 
> For the approach, pippin and I sketched together a basic spec a couple
> of years back.
> https://mail.gnome.org/archives/gegl-developer-list/2012-June/msg4.html
> https://git.gnome.org/browse/gegl/tree/docs/journal.txt
> 
> [...]
> 
> *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.

Cheers,
Rishi

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

pgpqpmEZ9F9WD.pgp
Description: PGP signature
___
gegl-developer-list mailing list
List address:gegl-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gegl-developer-list



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

2016-09-24 Thread Jon Nordby
On 10 September 2016 at 23:12, Philip R. Dutton
 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
> this?

For the approach, pippin and I sketched together a basic spec a couple
of years back.
https://mail.gnome.org/archives/gegl-developer-list/2012-June/msg4.html
https://git.gnome.org/browse/gegl/tree/docs/journal.txt

"How hard" is always a tricky question to answer... One would have to
implement such a Journal, including persistence and wiring up to
follow GEGL graph changes. These tasks would require one to be fairly
comfortable with C programming. Some GObject experience would be a
benefit.

*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.


-- 
Jon Nordby - www.jonnor.com
___
gegl-developer-list mailing list
List address:gegl-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gegl-developer-list