Some widgets in dialog are not shown when a Python plugin is registered as save handler
GIMP version: 2.10.20
Operating System: Linux
Package: AppImage
Description of the bug
Some widgets for parameters are missing when a plugin is registered as save handler.
Here is a minimal example. As you see, there are 4 additional parameters (a, b, c, d) that come after the standard ones (image, drawable, filename, and raw-filename).
#!/usr/bin/env python2
import gimp
from gimpfu import *
def test(img, drawable, filename, raw_filename,
a, b, c, d):
pass
def register_save():
gimp.register_save_handler('file-test-save', 'test', '')
register(
'file-test-save',
'Test blurb',
'Test help',
'Test author',
'Test copyright',
'Test year',
'Test label',
'*',
[
(PF_IMAGE, 'image', 'Input image', None),
(PF_DRAWABLE, 'drawable', 'Input drawable', None),
(PF_STRING, 'filename', 'The name of the file', None),
(PF_STRING, 'raw-filename', 'The name of the file', None),
(PF_INT, 'a', 'a', 0),
(PF_STRING, 'b', 'b', '1'),
(PF_INT, 'c', 'c', 2),
(PF_BOOL, 'd', 'd', True),
],
[],
test,
menu='<Image>/Filters' # <- Ok, all 4 widgets
#menu='<Save>', on_query=register_save, # <- Only 'c' and 'd'
)
main()
When this plugin is in the "<Image>/Filters" menu, all 4 widgets are in the plugin's dialog, but when it's in the "<Save>" menu and registered via gimp.register_save_handler(), there are only widgets for 'c' and 'd' parameters: