Thank you in advance for anybody helping.
I am using GIMP 2.10.28 on Windows 7. I am following the youtube video at
https://www.youtube.com/watch?v=nmb-0KcgXzI&t=480s&ab_channel=JacksonBates
for developing a simple Python plugin. I am unable to get the simple plugin to show up. The sample exercise in the video is to add a "gimp-Hello-Warning" in the File menu. But no matter where I put the .py file, it doesn't show up. I've tried all of the places in the edit -> preference -> folder -> plugins and no luck.
C:\Users\####\AppData\Roaming\GIMP\2.10\plug-ins E:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins
I even tried:
C:\Users\####\AppData\Roaming\GIMP\2.10\scripts E:\Program Files\GIMP 2\lib\gimp\2.0\scripts
Here's the no brainer program
#!/usr/bin/env python
# Tutorial available at: https://www.youtube.com/watch?v=nmb-0KcgXzI # Feedback welcome: jacksonbates@hotmail.com
from gimpfu import *
def Hello-Warning(image, drawable): # function code goes here... pdb.gimp_message("Hello World!")
register( "python-fu-Hello-Warning", "This is a short message", "This is a long message", "Myname", "Myname", "2021", "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 ], [], Hello-Warning, menu="/File") # second item is menu location
main()
Last edited by ecs1749 on Wed Sep 29, 2021 7:45 am, edited 1 time in total.
|