I've been talking to a few people about the future of GIMP plugins,
and worked out that in terms of current plugins, there will end up
being two types:
Those that are related to GEGL (implementing GEGL operations,
modifying graphs, applying graphs) and those that are not (convenience
plugins that don't modify the image state directly, such as my plugin
to set FG to the average of FG+BG, plugins to generate resources like
brushes patterns palettes or gradients, plugins to analyze the image,

This second class is really all I can see traditional plugins needing
to do after GEGLification is complete and stable. Ie. the first class
of plugins wouldn't need to use the PDB at all, probably.
Do you agree with this idea?
In that case, it makes sense that a plug-in would mainly provide
actions. It is also useful to be able to trigger other actions, since
many things aren't accessible through the PDB yet, only as actions.
(for example, I would like to make a plugin that creates an additional
display, zooms it to 200% and then shrink wraps it, so I have a
'working area' and a 'real size' view.)

Currently, I have to use xdotool to fake the input events required to
select the appropriate menu items, in order to implement my 'two
displays' action described above.
What would work a lot better, is something like the following:

display = pdb.gimp_display_new (image)
pdb.gimp_action_run ('view-zoom-2-1', display, 0)
pdb.gimp_action_run ('view-shrink-wrap', display, 0)

What do you people think of this? Is it worth pursuing, or would PDB
functions for every action be easier achieved? I'm certainly prepared
to work on either.

(incidentally, it may be relevant to this that I have made an
extension 'GPixMint' which hosts quick actions like these so they can
run a lot faster than the typical 'run an entire executable each time
the function is called' plugin, and plenty of actions for it)
Gimp-developer mailing list

Reply via email to