Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GIMP 3 Python Enums: Definitive Plug-in and Script-Fu Guide
#1
If you’re developing Python plug-ins or Script-Fu scripts for GIMP 3, you’ll know the frustration of tracking down correct enum values. The official API docs are written for C developers, leaving Python authors to piece things together from source code, forum posts, and trial and error.

I’ve put together what I hope is the definitive reference: every enum available in GIMP 3.0, compiled directly from a live GIMP 3.0.8 instance using a Python-Fu console script. That means the values are guaranteed accurate for that version. And the script is available as a free download so you can regenerate the complete listing for any future GIMP 3 release.

Each enum includes:
  • the Python form you actually use in your plug-ins (e.g. Gimp.LayerMode.NORMAL)
  • the uppercase PDB identifier, most useful when cross-referencing with the C API docs or porting code from GIMP 2.x Script-Fu scripts
  • the raw integer value for legacy Script-Fu work
  • the GEGL nickname for serialisation.
The Gimp.LayerMode table also includes the full GEGL operation string.

Every enum has a plain-English description written specifically for Python and Script-Fu developers.

https://www.chuckhenrich.com/gimp-3-pyth...reference/

Comments/suggestions welcome.
Reply
#2
The link on your site to download the Python script gives a page not found error.
Reply
#3
Thumbs Up 
Very useful, thanks a lot!!!
Reply


Forum Jump: