Gimp-Forum.net
GIMP 3 Python Enums: Definitive Plug-in and Script-Fu Guide - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP)
+--- Thread: GIMP 3 Python Enums: Definitive Plug-in and Script-Fu Guide (/Thread-GIMP-3-Python-Enums-Definitive-Plug-in-and-Script-Fu-Guide)



GIMP 3 Python Enums: Definitive Plug-in and Script-Fu Guide - chuckhenrich - 02-23-2026

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-python-enums-complete-reference/

Comments/suggestions welcome.


RE: GIMP 3 Python Enums: Definitive Plug-in and Script-Fu Guide - programmer_ceds - 02-23-2026

The link on your site to download the Python script gives a page not found error.


RE: GIMP 3 Python Enums: Definitive Plug-in and Script-Fu Guide - Scallact - 02-23-2026

Very useful, thanks a lot!!!


RE: GIMP 3 Python Enums: Definitive Plug-in and Script-Fu Guide - chuckhenrich - 02-23-2026

(2 hours ago)programmer_ceds Wrote: The link on your site to download the Python script gives a page not found error.

Hi there - sorry about that. I don't know what the problem was. I've refreshed the link and cleared caches on my side. I've tested on a couple of browsers and I was getting the same before I implemented the fix. Now it seems to work.

Please try again and let me know how it goes.


RE: GIMP 3 Python Enums: Definitive Plug-in and Script-Fu Guide - programmer_ceds - 02-23-2026

(1 hour ago)chuckhenrich Wrote:
(2 hours ago)programmer_ceds Wrote: The link on your site to download the Python script gives a page not found error.

Hi there - sorry about that. I don't know what the problem was. I've refreshed the link and cleared caches on my side. I've tested on a couple of browsers and I was getting the same before I implemented the fix. Now it seems to work.

Please try again and let me know how it goes.

The link now takes me to a page that contains the script, which is OK but a link to a file to download might be preferred. That aside this is very useful, thank you.


RE: GIMP 3 Python Enums: Definitive Plug-in and Script-Fu Guide - chuckhenrich - 02-23-2026

(1 hour ago)programmer_ceds Wrote:
(1 hour ago)chuckhenrich Wrote:
(2 hours ago)programmer_ceds Wrote: The link on your site to download the Python script gives a page not found error.

Hi there - sorry about that. I don't know what the problem was. I've refreshed the link and cleared caches on my side. I've tested on a couple of browsers and I was getting the same before I implemented the fix. Now it seems to work.

Please try again and let me know how it goes.

The link now takes me to a page that contains the script, which is OK but a link to a file to download might be preferred. That aside this is very useful, thank you.

I noticed that in my testing. It's a browser thing. I could wrap the text file in a .zip, but that would mean visitors would need to download the link, unzip the file, then open the text file and copy the contents. And they'll need to copy the contents anyway, either to include in their own python code or to run in the GIMP Python console. So it's actually a more straightforward process to just copy the contents from the browser.

Anyway, thanks for flagging this for me, I learned something!