Hi,
a long standing enhancement[1] in GEGL has been to allow loading meta-operations from a serializable file instead of requiring them to be coded in C.
At 31c3 I started working on this, and yesterday it reached a generally working state. Today I merged the code to master[2].
Each .json file of right format that is found in the module path for GEGL will create a new GeglOperationMeta subclass. It will be register it with the specified operation name, and exported properties/pads.
When the operation is instantiated, it builds up the subgraph of GeglNodes specified and connects. Property changes on the meta-operation are forwarded onto the real node inside.
An example of the .json format can be seen here:
https://git.gnome.org/browse/gegl/tree/operations/json/grey2.json
When the operation is instantiated, it builds up the subgraph of GeglNodes specified and connects. Property changes on the meta-operation are forwarded onto the real node inside.
An example of the .json format can be seen here:
https://git.gnome.org/browse/gegl/tree/operations/json/grey2.json
This is a format also used by other dataflow/flow-based-programming tools[3].
This for instance allows one to use the node-based editor Flowhub+imgflo to build a new image filter, save it as .json and then use it in GIMP[4] (screenshot). One can of course also hand-write the json files, or implement other editors for these.
It might make sense to also implement serialization of a graph/sub-graph to this format directly in GEGL itself.
It might make sense to also implement serialization of a graph/sub-graph to this format directly in GEGL itself.
Note: This adds json-glib 1.0 as a dependency of GEGL, so make sure you have it installed (including development headers).
_______________________________________________ gegl-developer-list mailing list List address: gegl-developer-list@xxxxxxxxx List membership: https://mail.gnome.org/mailman/listinfo/gegl-developer-list