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

Support for loading meta-operations from .json now in master

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.

Support for loading meta-operations from .json now in master Jon Nordby 20 Jan 17:08
  Support for loading meta-operations from .json now in master Joao S. O. Bueno 20 Jan 19:35
Jon Nordby
2015-01-20 17:08:19 UTC (over 9 years ago)

Support for loading meta-operations from .json now in master

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 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.

Note: This adds json-glib 1.0 as a dependency of GEGL, so make sure you have it installed (including development headers).

References 1. https://bugzilla.gnome.org/show_bug.cgi?id=465743 2.
https://git.gnome.org/browse/gegl/commit/?id=564f45bad76eb0f888e628ea70345912dd68cbbb 3. http://noflojs.org/documentation/json 4. https://twitter.com/jononor/status/557570481206099969

Jon Nordby - www.jonnor.com
Joao S. O. Bueno
2015-01-20 19:35:39 UTC (over 9 years ago)

Support for loading meta-operations from .json now in master

Yay! :-)

On 20 January 2015 at 15:08, Jon Nordby wrote:

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 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.

Note: This adds json-glib 1.0 as a dependency of GEGL, so make sure you have it installed (including development headers).

References 1. https://bugzilla.gnome.org/show_bug.cgi?id=465743 2.
https://git.gnome.org/browse/gegl/commit/?id=564f45bad76eb0f888e628ea70345912dd68cbbb 3. http://noflojs.org/documentation/json 4. https://twitter.com/jononor/status/557570481206099969

-- Jon Nordby - www.jonnor.com

_______________________________________________ gegl-developer-list mailing list
List address: gegl-developer-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gegl-developer-list