I have been trying to teach myself how to write Gimp scripts/plug-ins using
Python-Fu (and trying to learn some
python along the way, as well).
I have been using the
GIMP Python Documentation and a few online tutorials that I have found -
Extending Gimp with Python (which is listed on Gimp Chat's
GIMP Script Writing Resources thread),
Use Python to write plug-ins for GIMP, and
Gimp plugins with Python-fu.
According to the GIMP
Python Documentation:
Quote:
The parameters to register are:
name
blurb
help
author
copyright
date
menupath
imagetypes
params
results
function
Most of these parameters are quite self explanatory. The menupath option should start with <Image>;/ for image plug-ins and <Toolbox>/ for toolbox plug-ins. The remainder of the menupath is a slash separated path to its menu item.
The above linked tutorials are consistent with the above.
However, when I was trying to solve an issue that I was having with registering a
python plug-in (see my post
Python Scripts not Registering in Gimp 2.8), I came across the following posts on other support sites that referenced a plug-in's menu path in the register call differently from the way it was done in the GIMP
Python Documentation or the above linked tutorials:
Duplicating a layer (Python plug-in) on Gimp Forums
Attempting to Write Python Plugin and Failing Miserably on Gimp Forums
Gimp: why can't I register this? on stackoverflow
These links indicate that the menu path and the menu name should be separated, with the menu path being the last parameter listed for "register." The stackoverflow link says:
Quote:
...putting the menu path along with the script menu name is deprecated in GIMP - the correct way to do it is, after the "date" parameter, pass just the name that should show in the menu...and pass the menu path as a named parameter, at the end of the call....
Apparently, either was must work since my
python plug-ins based on the materials I first linked seem to work.
My question is: Is there updated documentation on this and other aspects of
python-fu? If so, where can I find that documentation? I was thinking that maybe that documentation would have other info that might be helpful.
Thanks in advance for any help.
![Thankful :tyspin](./images/smilies/thankyouspin.gif)