Created
September 14, 2015 02:10
-
-
Save JacksonBates/44be64ffe89130f4a348 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# GIMP UI examples of options | |
# Feedback welcome: [email protected] | |
from gimpfu import * | |
def ui_examples_1(int_var, float_var, string_var, value_var, color_var, | |
colour_var, image_var, layer_var, channel_var, drawable_var, | |
toggle_var, boolean_var): | |
return | |
register( | |
"python_fu_ui_examples_1", | |
"Show half of the UI options", | |
"Dummy UI", | |
"Jackson Bates", | |
"Jackson Bates", | |
"2015", | |
"Show UI Options...", | |
"", # Image type | |
[ | |
(PF_INT, "int_var", "int", 50), | |
(PF_FLOAT, "float_var", "float", 3.14159), | |
# I don't know the diference between these PF_INT8, PF_INT16, PF_INT32 | |
# Assuming bitsize, but I'd love to be further enlightened! | |
(PF_STRING, "string_var", "string", "Awesomesauce!"), | |
(PF_VALUE, "value_var", "value", "Is this the same as above?!"), | |
(PF_TEXT, "text_var", "text", "This accepts a longer string of text"), | |
(PF_COLOR, "color_var", "color", (1.0, 1.0, 1.0)), | |
(PF_COLOUR, "colour_var", "colour UK sp. :)",(255.0, 255.0, 255.0)), | |
(PF_IMAGE, "image_var", "image", None), | |
(PF_LAYER, "layer_var", "layer", None), | |
(PF_CHANNEL, "channel_var", "channel", None), | |
(PF_DRAWABLE, "drawable_var", "drawable", None), | |
(PF_TOGGLE, "toggle_var", "toggle", 1), | |
(PF_BOOL, "boolean_var", "Boolean", True), | |
], | |
[], | |
ui_examples_1, menu="<Image>/Filters/Languages/Python-Fu" ) | |
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# GIMP UI examples of options | |
# Feedback welcome: [email protected] | |
from gimpfu import * | |
def ui_examples_2(radio_var, option_var, spinner_var, slider_var, | |
adjustment_var, file_var, dirname_var, font_var, | |
brush_var, pattern_var, gradient_var, palette_var): | |
return | |
register( | |
"python_fu_ui_examples_2", | |
"Show other half of the UI options", | |
"Dummy UI 2", | |
"Jackson Bates", | |
"Jackson Bates", | |
"2015", | |
"Show more UI Options...", | |
"", # Image type | |
[ | |
(PF_RADIO, "radio_var", "radio", "radio1_value", | |
( | |
("radio1_label", "radio1_value"), | |
("radio2_label", "radio2_value") | |
) | |
), | |
(PF_OPTION, "option_var", "option", 0, | |
("Opt1", "Opt2", "Opt3", "Opt4") | |
), | |
(PF_SPINNER, "spinner_var", "spinner", 10, (1, 10, 0.5)), | |
(PF_SLIDER, "slider_var", "slider", 100, (0, 100, 1)), | |
(PF_ADJUSTMENT, "adjustment_var", "adjustment", 10, (1, 10, 1)), | |
(PF_FILE, "file_var", "file", ""), | |
(PF_DIRNAME, "dirname_var", "dirname", "/tmp"), | |
(PF_FONT, "font_var", "font", "Sans"), | |
(PF_BRUSH, "brush_var", "brush", None), | |
(PF_PATTERN, "pattern_var", "pattern", None), | |
(PF_GRADIENT, "gradient_var", "gradient", None), | |
(PF_PALETTE, "palette_var", "palette", ""), | |
], | |
[], | |
ui_examples_2, menu="<Image>/Filters/Languages/Python-Fu" ) | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment