Reputation: 77
I am trying to write a python-fu script to simply print a warning to the error console. I have this same thing working fine with schema-fu.
But its not showing on the menu with python-fu.
I have the script in the directory configured within gimp for the plugins: /Users/myusername/Library/Application Support/GIMP/2.10/plug-ins
the file is named: python-fu-hello-warning.py
Running this in MacOS Catalina, version 10.15.3. The version of GIMP is 2.10.14.
This is the code:
#!/usr/bin/env python
# Hello Warning
from gimpfu import *
def hello_warning():
pdb.gimp_message("hello warning")
register(
"python_fu_hello_warning",
"Hello warning",
"Hello warning TO ERROR CONSOLE",
"Walter Moore",
"Walter Moore",
"2020",
"Hello warning (Py)...",
"",
[],
[],
hello_warning,
menu="<Image>/File/HelloWarning"
)
main()
What am i doing wrong?
Upvotes: 1
Views: 2418
Reputation: 8914
Works for me, so the only reasons I can think of is that either:
chmod +x ...
). On OSX and Linux, Gimp only scans for files marked as executable in the plugins directories.In the general case if your plugin doesn't register:
python pluginfile.py
in a terminal, blatant errors will show there. When it complains about gimpfu
you are good to go.print '*************************'
at the top of your main, this will be executed each time the plugin runs and make it easier to spot other output from your script. You can also use more informative print lines.Upvotes: 4