[Gimp-user] Debugging register function for registration of a python plugin under Windows XP



Debugging register function for registration of a python plugin under Windows XP

Hey, all.

I've started writing plugins in Python for GIMP but have so far only been able
to successfully register a plugin via the following form:

# in C:\Program Files\GIMP 2_8\lib\gimp\2.0\plug-ins
# synch-current-frame.py

def synch_current_frame(*args):
        # code
        return

register("synch_current_frame",
         N_("Adjust layers to the current animation-frame."),
         howTo,
         "Needthistool",
         "Needthistool",
         "June 2014",
         N_("_Synchronize Layers to Current Frame"),
         "",
         [],
         [],
         synchronize_to_frame,
         menu="<Toolbox>/Layer/Stack",
         domain=("gimp20-python", gimp.locale_directory)
         )
main()

Changing the leading category from "<Toolbox>" to "<Image>" or "<Layer>" seems
to immediately break something and cause GIMP to skip over the script, as does
adding tuples to describe parameters to the first list.

I'm aware that Linux users can see what errors are raised by register during
startup but I'm not aware of how to do this with Windows. The Error Console and
builtin Python shell seem only to display errors from plugins that are able to
first load in correctly and show no record of what GIMP did while it was
loading. After I'm past that, things are straight-forward, but at present I have
no idea what I'm doing right or wrong as I register a function and currently
have to "pass" parameters to plugins in some awkward ways, unable to achieve
gimpfu registration with parameters. To avoid this, I need to debug the register
function's registration, which happens at startup, where errors are hidden.

How do I avoid flying blind on Windows (XP) with GIMP 2.8.8?

Thanks,
- Seldom

-- 
SeldomNeedy (via www.gimpusers.com/forums)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]