RSS/Atom feed Twitter
Site is read-only, email is disabled

XML Serialization Issue

This discussion is connected to the gegl-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.

XML Serialization Issue Isaac Wagner 08 Jul 00:10
  XML Serialization Issue Isaac Wagner 08 Jul 22:44
Isaac Wagner
2012-07-08 00:10:32 UTC (almost 12 years ago)

XML Serialization Issue

Hey all,

I have spent the last hour incredibly frustrated trying to properly serialize and deserialize graphs in XML. I ran into two issues, both of which I "solved" in the gegl source. I would like to know if these are issues I could have solved in another way through proper use of the public API, or if they were in fact issues and that I should fix them in master and push to the repository.

Issue one: gegl_node_get_consumers did not function for meta-ops. No consumers were reported when consumers were, in fact, connected to the operation. Fixed by adding

if(node->is_graph)

node = gegl_node_get_output_proxy(node, "output");

to line 1953 of gegl-node.c

Issue two: serialization of nodes with no outputs (e.g. gegl:display, gegl:save) returned an empty XML tree. Fixed by removing line 1098 from gegl-xml.c

gegl = gegl_node_get_output_proxy (gegl, "output");

With both of these changes I am able to de/serialize graphs in the editor successfully. The one issue which still frustrates me is that to my knowledge the current serialization scheme does not allow for multiple top-level outputs to be serialized into a single XML file. I've been thinking about that and will probably bring it up in a new thread.

Isaac Wagner
2012-07-08 22:44:57 UTC (almost 12 years ago)

XML Serialization Issue

I ended up spending a few days digging through Gegl and fixed a handful of issues which were all colluding to drive me insane. I'll try to clean them up into their own branch so they can be more easily integrated into master, but for now, a cat:

http://i.imgur.com/rSnZr.png

(that graph can be saved and loaded with all its connections intact)

On Sat, Jul 7, 2012 at 8:10 PM, Isaac Wagner wrote:

Hey all,

I have spent the last hour incredibly frustrated trying to properly serialize and deserialize graphs in XML. I ran into two issues, both of which I "solved" in the gegl source. I would like to know if these are issues I could have solved in another way through proper use of the public API, or if they were in fact issues and that I should fix them in master and push to the repository.

Issue one: gegl_node_get_consumers did not function for meta-ops. No consumers were reported when consumers were, in fact, connected to the operation. Fixed by adding

if(node->is_graph)

node = gegl_node_get_output_proxy(node, "output");

to line 1953 of gegl-node.c

Issue two: serialization of nodes with no outputs (e.g. gegl:display, gegl:save) returned an empty XML tree. Fixed by removing line 1098 from gegl-xml.c

gegl = gegl_node_get_output_proxy (gegl, "output");

With both of these changes I am able to de/serialize graphs in the editor successfully. The one issue which still frustrates me is that to my knowledge the current serialization scheme does not allow for multiple top-level outputs to be serialized into a single XML file. I've been thinking about that and will probably bring it up in a new thread.