Reputation: 2354
So basically I'm looking for a way to write a GIMP plugin in Python that would create some additional user interface elements and allow me to add some functionality on top of what the GIMP has.
Question(s) are:
Is this even possible?
If yes then where is it best to look for a guide? (or perhaps which source files would I be recomended to read upon, or maybe somebody could point me to a good example plugin I could get use of)
To let you get a better glimpse of what I need is I want create a custom tool-like plugin, a path editor, that would be able to display them in the editing viewport and list in and additional window. I welcome even any tips on the topic.
Upvotes: 0
Views: 1077
Reputation: 110456
So - It is possible to create plug-ins for GIMP in Python, C, Scheme and some other languages with varying levels of support, as no one maintains the binds for them.
However, these plug-ins interact with GIMP only exchanging data and issuing commands to GIMP through a GIMP-only "wire" protocol - it is not possible for a GIMP plug-in, in Python or otherwise, to create additional UI elements in GIMP but what they create by themselves on their own windows.
Also, it is not possible to receive events from GIMP's UI on the plug-in itself. Up to today, the workaround for plug-ins that need user input on the image itself is to draw an image preview on the plug-in window (which some plug-ins that ship with GIMP 2.8 do) - or, for example, to ask the user to create an specific Path, using the path nodes as markers that can be retrieved from the plug-in.
Due to this constraints, it is not possible to create a custom tool or path editor. You can however do these things in GIMP's main code itself and propose a patch to the project - but them, you have to use C + gobject.
Upvotes: 1