Search code examples
pythongimpgimpfu

Where can I find the GIMP Python Object References, I'm currently looking for the properties of Vectors and Points


I'm trying to write a script in GIMP Python and cannot seem to find any online docs regarding the GIMP Python Objects such as images, layers, paths, vectors, strokes, ect.

I've looked around developer.gimp.org and the good old google but cannot seem to find anything.

I've also tried the looking at the GIMP installation files, I followed the gimpfu.py and found the object mapping of PF_VECTORS to gimp.Vectors but this takes me to a gimp.pyd file which I cannot view.

Any tips would be much appreciated, thank you.


Solution

  • The Gimp python doc is here. Not complete but a good start.

    Beside this, most methods (there are some that are not in the doc, use dir() on an instance of the class) are just straightforward adaptations of the PDB functions.

    All I known about path/vectors in Gimp has been found/inferred by doing a dir() on vectors in the Python console. There isn't that much going on, it's a fairly straightforward application of Bézier curves.

    Some basics on Paths can be found here.

    If you want sample code for Gimp python scripts dealing with paths see here.

    If you have specific questions ask here on SO with a gimp tag or in the forum above (same person, actually:))