Skip to content Skip to sidebar Skip to footer

Gimp: Why Can't I Register This?

I'm writing an add-on for Blender to sync it with Gimp and this script should be able to start from within Gimp, but I can't register it... Why? blender_gimp_sync.py: # -*- codin

Solution 1:

You didn't say which error you are getting - but since you posted your source file I think I can guess it: GIMP expect's it's plug-ins to be exectuable by the system - and what tell's Posix (linux included) systems that a file should be executed with a particular interpreter or shell is the shebang line - the line that goes #!/usr/bin/env python in your example.

This line, however, has to be the first line in your file - the #! characters in it should be the first two characters in the file. The line denoting the character encoding - # -*- coding: utf-8 -*- should come after it - it has to be the second line in the file, no blank lines between them).

And finally, be sure to set the script as executable, by running "chmod a+x " on the Python file.

related to it, but not being what is causing the problem, 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 -- "Sync" - and pass the menu path as a named parameter, at the end of the call, like: menu="<Image>/Image/Blender-Gimp"

Post a Comment for "Gimp: Why Can't I Register This?"