I’ve been trying to write a python plugin for Gimp for a custom image file format I’m experimenting with. I can’t get the plugin to register. The plugin file’s name does show up briefly in the loading splash-screen, but the exporter doesn’t recognize the extension and the plugin doesn’t show in Gimp’s plug-in browser.
I’m using Gimp 2.1.30 on Windows 10.
Here is my current, non-working plugin. It’s pared down to minimize confounding factors for this problem:
def save_prt(img, drawable, filename, raw_filename):
pdb.gimp_message("Exporting " + filename)
register(
"file-prt-save",
"Save a p-art (.prt) file",
"Save an image to the p-art (.prt) file format. This format is useful for storing pixel art with small file sizes.",
"Jonathan Heard",
"Jonathan Heard",
"2023",
"P-art image",
"*",
[
(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),
],
[],
save_prt,
on_query = register_save_handlers,
menu = '<Save>'
)
main()
Does anyone have an idea as to what might be going wrong?
Thanks!