Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Searching for python script islands to layers
You didn't copy verbatim my procedure. You are using old-style registration since you don't use a specific "menu" named parameter, but lump the menu position and submenu item in one parameter  (the variable "menupath"). In the new-style registration, there is one variable for the menu, and one that is just used for the menu item (the desc* variables in my code, that also serves other purposes). And when using old-style, the behavior of the default parameters (image/drawable) is different.

  • I use variables for the parameters because I register several functions and many parameters are identical, so this avoids repetition. However, the function for each plugin is guaranteed to be different, so there is no point in having a "function" variable for this. In fact, in Python, the function name is a variableSmile
  • The copyright is a copyright, not a licence. This field is really meant to be the copyright owner (usually, but not always, the same as the author).
  • It can be a nice ego boost to have a submenu in Filters bearing you name, but it doesn't help users finding your script. IMHO it should go in <Layer>
  • The output of "print" statements is invisible to most users (on Windows, it is even worse, it is invisible and can freeze the script),  use gimp.message() to issue messages to the user.

Forum Jump: