[Gegl-developer] 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.


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