[Gegl-developer] Support for loading meta-operations from .json now in master
- From: Jon Nordby <jononor gmail com>
- To: gegl-developer-list <gegl-developer-list gnome org>
- Subject: [Gegl-developer] Support for loading meta-operations from .json now in master
- Date: Tue, 20 Jan 2015 18:08:19 +0100
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.jsonThis 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.
Note: This adds json-glib 1.0 as a dependency of GEGL, so make sure you have it installed (including development headers).
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]