This file seems to define all the possible PF_ constants/variables that are used in Python Fu to accept inputs from user.
It's here for future reference.
I have ran into it before but keep forgetting how to search for it... and I tend to search for "PF_ constants" or "PF_ variables" so here it is.
https://www.google.ca/url?sa=t&rct=j&q= ... 2_3tl0Krrg
It is currently 01 Mar 2021, 03:31
| ||||
| ||||
|
|

PF_ constants or variables defined for inputs for Python Fu scripts for GIMP

- tim
- View:
|Posts
- Topic Posts: 2/4 | Posts: 5296
- Joined: 26 Sep 2016, 00:16
- Cash on hand: 76,906.21 GLP
- Bank: 275,463,458.00 GLP
- Gender: Guy
- Location: Canada
- GIMP Version: 2.10.X
- Paint Blotches blog
- Play them songs blog
- Personal Blog
- x 3094
- x 1046
- Contact:
- tim
- View:
|Posts
- Topic Posts: 2/4 | Posts: 5296
- Joined: 26 Sep 2016, 00:16
- Cash on hand: 76,906.21 GLP
- Bank: 275,463,458.00 GLP
- Gender: Guy
- Location: Canada
- GIMP Version: 2.10.X
- Paint Blotches blog
- Play them songs blog
- Personal Blog
- x 3094
- x 1046
- Contact:
What's important to note is this portion code that can be cut and pasted to use as parameters in python fu code
Code: Select all
(PF_INT, "p0", "_INT:", 0), # PF_INT8, PF_INT16, PF_INT32 similar but no difference in Python.
(PF_FLOAT, "p02", "_FLOAT:", 3.141),
(PF_STRING, "p03", "_STRING:", "foo"), # alias PF_VALUE
(PF_TEXT, "p04", "TEXT:", "bar"),
# PF_VALUE
# Pick one from set of choices
(PF_OPTION,"p1", "OPTION:", 0, ["0th","1st","2nd"]), # initially 0th is choice
(PF_RADIO, "p16", "RADIO:", 0, (("0th", 1),("1st",0))), # note bool indicates initial setting of buttons
# PF_RADIO is usually called a radio button group.
# SLIDER, ADJUSTMENT types require the extra parameter of the form (min, max, step).
(PF_TOGGLE, "p2", "TOGGLE:", 1), # initially True, checked. Alias PF_BOOL
# PF_TOGGLE is usually called a checkbox.
(PF_SLIDER, "p3", "SLIDER:", 0, (0, 100, 10)),
(PF_SPINNER, "p4", "SPINNER:", 21, (1, 1000, 50)), # alias PF_ADJUSTMENT
# Pickers ie combo boxes ie choosers from lists of existing Gimp objects
(PF_COLOR, "p14", "_COLOR:", (100, 21, 40) ), # extra param is RGB triple
# PF_COLOUR is an alias by aussie PyGimp author lol
(PF_IMAGE, "p15", "IMAGE:", None), # should be type gimp.image, but None works
(PF_FONT, "p17", "FONT:", 0),
(PF_FILE, "p18", "FILE:", 0),
(PF_BRUSH, "p19", "BRUSH:", 0),
(PF_PATTERN, "p20", "PATTERN:", 0),
(PF_GRADIENT, "p21", "GRADIENT:", 0),
(PF_PALETTE, "p22", "PALETTE:", 0),
(PF_LAYER, "p23", "LAYER:", None),
(PF_CHANNEL, "p24", "CHANNEL:", None), # ??? Usually empty, I don't know why.
(PF_DRAWABLE, "p25", "DRAWABLE:", None),
# Mostly undocumented, but work
(PF_VECTORS, "p26", "VECTORS:", None),
(PF_FILENAME, "p27", "FILENAME:", 0),
(PF_DIRNAME, "p28", "DIRNAME:", 0)
# PF_REGION might work but probably of little use. See gimpfu.py.
aka Tin
Thank you Tin for all your hard work. I'm still on a STEEP learning curve but I have a lot of bookmarks as I continue to learn!
I've written Script-Fu before (a long time ago) but I need to learn Python-Fu. This should be quite helpful!
Thanks Muchly!
Thanks Muchly!
Artists Aren't Crazy...
We're Eccentric!
We're Eccentric!
| ||||
| ||||
|
-
- Similar Topics
- Replies
- Views
- Last post
-
- 3 Replies
- 1048 Views
-
Last post by enxio27
21 Oct 2020, 12:15
-
-
Python occasional "Unexpected error: [Errno 9] Bad file descriptor"
by opusGlass » 06 Mar 2020, 03:08 » in GIMP Python Fu Scripts/Plug-ins - 2 Replies
- 12074 Views
-
Last post by Wallace
09 Mar 2020, 03:09
-
-
- 4 Replies
- 164 Views
-
Last post by tim
24 Feb 2021, 12:23
-
-
Update to Custom Font Facemaker to Version 0.03 for Gimp 2.10
by skinnyhouse » 01 Apr 2020, 12:26 » in GIMP Python Fu Scripts/Plug-ins - 0 Replies
- 2599 Views
-
Last post by skinnyhouse
01 Apr 2020, 12:26
-
-
-
Falling snow animated Scheme Script for Gimp
by JimmyMarco » 03 Apr 2020, 17:35 » in GIMP Scheme Fu Scripts - 30 Replies
- 19131 Views
-
Last post by Lenny
25 Apr 2020, 22:30
-
-
-
Custom Font Paragrapher for Gimp 2.10 Initial Release
by skinnyhouse » 06 Apr 2020, 09:15 » in GIMP Python Fu Scripts/Plug-ins - 10 Replies
- 5717 Views
-
Last post by skinnyhouse
09 Apr 2020, 19:38
-
-
-
Custom Font Paragrapher for Gimp 2.10 Version 002
by skinnyhouse » 10 Apr 2020, 09:59 » in GIMP Python Fu Scripts/Plug-ins - 2 Replies
- 2841 Views
-
Last post by skinnyhouse
12 Apr 2020, 08:37
-
Who is online
Users browsing this forum: No registered users and 23 guests