GIMP 3.0.6 (revision 1) Python-Fu - my scripts do not appear in GIMP menus.
I'm running it on a Windows 10 laptop, with all updates available up to the end of service date.
(Thanks, John T. Haller -- and everyone else who works on these projects, making great stuff available!!! John, I see your name all over, and in particular for the PortableGIMP project, so that's why I'm thanking you by name.)
The main product page at https://portableapps.com/apps/graphics_pictures/gimp_portable says, "Adding Plugins and Scripts: In a local install of GIMP, user plug-ins and scripts are typically installed to the plug-ins and scripts directories within C:\Users\USER\AppData\Roaming\Gimp\3.0\. In GIMP Portable, these directories would be X:\PortableApps\GIMPPortable\Data\GimpAppData\".
I have a folder named hello_world containing a script hello_world.py placed in F:\GIMPPortable\Data\GimpAppData\scripts . I keep my portable apps placed under my F: root directory, not under a PortableApps directory, and not running from the Portableapps platform.
hello_world.py contents:
#!/usr/bin/env python3
from gimpfu import *
def hello_world():
pdb.gimp_message("Hello, world!")
register(
"python_fu_hello_world", # Unique identifier
"Hello World", # Menu label
"Displays a 'Hello, world!' message", # Description
"Your Name", "Your Name", "2026", # Author info
"<Filters>/Hello World", # Menu path
"", # Image types the script works on
[], # Input parameters
[], # Output parameters
hello_world # Function to be called
)
main()
This is my very first use of Python-Fu. Here are some facts, numbered in case that makes it easier for any later references:
- I do remember to quit and restart PortableGIMP after any changes to script or script location.
- From what I have read, if there is a syntax error, that would prevent the script from appearing in the menus.
- I have tried placing the both *the script* and *the folder and the script inside it* in various directories suggested by web searches, with no success.
- I have tried writing just about the simplest script I could, in order to reduce the chances of syntax errors, and reviewed it as best I could without human aid.
- I've tried specifying the Menu Path differently to place the script's menu item at the top level and elsewhere.
- On that note, I have simply removed the <Filters> portion, and also tried it with /Filters instead, as suggested in one place.
- My script does not require any image to be loaded or any tool to be in use; but also, it doesn't appear whether an image is loaded or not, just in case anybody wonders.
I recognize that ...
... My problem might be GIMP-related as opposed to PortableGIMP-related.
... My problem might still be Python-Fu syntax related.
... And it could be something else ...
I'd love to be certain that I'm placing things in the right place, for one. I have even considered writing a VBA script to copy the script and the directory-with-script into EVERY subdirectory of my PortableGIMP installation, with a unique and slight modification to the output message in each instance, to see if ANY of them appear and tell me which one(s).
Other than that, I'm not certain what the problem might be.
I appreciate any help. And any earnest attempts to help
.
-- Pootmonkey = )