GNOME Bugzilla – Bug 465743
Load meta-operations from serialized files
Last modified: 2015-01-20 16:21:41 UTC
Currently Meta operations are programmed in C, with a manual construction of the graph, as well as setting up the relaying of properties from the meta-op to the contained child nodes. At this stage it should probably also be possible to reload the implementations of the XML based graph descriptions from file/memory to allow changes occuring while GEGL is already running.
There is a new graph editor in the works that might serve this purpose.
The person who was writing that graph editor seems to have shelved the project.
So there is no way to load a graph and then use it as part of a larger graph? Something like this: GeglNode *gegl, *load, *bcontrast, *fileout, *fileout2, *output, *proxy; gegl = gegl_node_new (); load = gegl_node_new_child (gegl, "operation", "gegl:load", "path", "./input.png", NULL); bcontrast = gegl_node_new_from_xml("<?xml version='1.0' encoding='UTF-8'?>" "<gegl>" "<node operation='gegl:box-blur'>" "<params>" "<param name='radius'>5.000000</param>" "</params>" "</node>" "<node operation='gegl:gamma'>" "<params>" "<param name='value'>2.500000</param>" "</params>" "</node>" "</gegl>" , "."); gegl_node_add_child(gegl, bcontrast); // bcontrast = gegl_node_new_child (gegl, // "operation", "gegl:box-blur", // "radius", 5.0, // NULL); load = gegl_node_new_child (gegl, "operation", "gegl:load", "path", "/home/dcliftreaves/Desktop/Prototype/Prototype/input.png", NULL); fileout = gegl_node_new_child(gegl, "operation", "gegl:png-save", "path", "../output.png", NULL); fileout2 = gegl_node_new_child(gegl, "operation", "gegl:png-save", "path", "../output.png", NULL); gegl_node_link_many (load, bcontrast, fileout, NULL); //proxy = gegl_node_get_output_proxy(fileout, "output"); char* outputxml = gegl_node_to_xml(bcontrast, "../my.xml"); fputs(outputxml, stdout); gegl_node_process(fileout);
Work in progress in meta-json branch: https://git.gnome.org/browse/gegl/log/?h=meta-json
Fixed in commit 564f45bad76eb0f888e628ea70345912dd68cbbb Merge: 539c231 aed6865 Author: Jon Nordby <jononor@gmail.com> Date: Tue Jan 20 17:20:08 2015 +0100 Merge remote-tracking branch 'origin/meta-json'