Created
September 13, 2015 10:48
-
-
Save JacksonBates/8e15b9e1464ebb154f24 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 | |
# Tutorial available at: | |
# Feedback welcome: [email protected] | |
from gimpfu import * | |
def NAME_OF_MAIN_FUNCTION(image, drawable): | |
# function code goes here... | |
register( | |
"python-fu-NAME-OF-MAIN-FUNCTION", | |
"SHORT DESCRIPTION", | |
"LONG DESCRIPTION", | |
"Jackson Bates", "Jackson Bates", "2015", | |
"NAME FOR MENU", | |
"", # type of image it works on (*, RGB, RGB*, RGBA, GRAY etc...) | |
[ | |
# basic parameters are: (UI_ELEMENT, "variable", "label", Default) | |
(PF_IMAGE, "image", "takes current image", None), | |
(PF_DRAWABLE, "drawable", "Input layer", None) | |
# PF_SLIDER, SPINNER have an extra tuple (min, max, step) | |
# PF_RADIO has an extra tuples within a tuple: | |
# eg. (("radio_label", "radio_value), ...) for as many radio buttons | |
# PF_OPTION has an extra tuple containing options in drop-down list | |
# eg. ("opt1", "opt2", ...) for as many options | |
# see ui_examples_1.py and ui_examples_2.py for live examples | |
], | |
[], | |
NAME_OF_MAIN_FUNCTION, menu="<Image>") # second item is menu location | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment