2.99 sensitivity API NO_IMAGE and ALWAYS not working in Python
GIMP: Current master 2.99 self built, meson
OS: Windows 10, 64 bits
Since https://gitlab.gnome.org/Wormnest/gimp-file-plugin-tests/-/blob/plugin-sensitivity/gimp-file-plugin-tests.py doesn't need an image to be loaded in GIMP I thought I would try the new sensitivity API. Above link is to the branch that has added the API as a test.
When enabling line 313 by removing the #
:
procedure.set_sensitivity_mask(Gimp.ProcedureSensitivityMask.ALWAYS)
I get an error when loading the plug-in:
Traceback (most recent call last):
File "E:\gimp-resources\plug-ins-30\gimp-file-plugin-tests\gimp-file-plugin-tests.py", line 313, in do_create_procedure
procedure.set_sensitivity_mask(Gimp.ProcedureSensitivityMask.ALWAYS)
OverflowError: 4294967295 not in range -2147483648 to 2147483647
When line 318 is enabled:
procedure.set_sensitivity_mask(Gimp.ProcedureSensitivityMask.NO_IMAGE)
- The plug-in is enabled when no image is loaded in GIMP but is disabled when one or more images are loaded. I would expect this enum to mean that it doesn't care whether or not an image is loaded.
- When I run "Run import tests" with no image loaded it starts but then crashes right away:
GIMP Error
Procedure 'file-import-tests' has been called with an invalid ID for argument 'image'. Most likely a plug-in is trying to work on an image that doesn't exist any longer.
Edited by Jacob Boerema