GNOME Bugzilla – Bug 795141
PDB Arrays Don't Work
Last modified: 2018-05-24 19:27:57 UTC
Created attachment 370757 [details] Takes an array as an input, and sends it back as a gimp_message(). The various arrays that you can apparently use in python plugins (according to the 'gimpenums' pydoc), prevent the plugin from loading if used as input parameters or return values. "PDB_INT32ARRAY", "PDB_STRINGARRAY", etc. None of them work. If I'm simply using them wrong, their functionality needs to be documented somewhere, because no one seems to know what's going on: http://www.gimpusers.com/forums/gimp-user/20548-arrays-in-python Included a minimalist python plugin demonstrating this as an attachment.
I have not much clue about python, but gimp-message takes a string, why do you think you can pass it an array?
TL;DR: Python reasons. The script should be fine, except that PDB_INT32ARRAY doesn't work. Firstly, gimp_message() in python seems to auto-convert whatever you throw into it into a string. Pass it a layer, float, tuple, dictionary, etc. and it'll all be equivalent to str(variable). Second, even if that *was* a problem, the error would happen when trying to run the plugin from GIMP. GIMP currently doesn't even load it. In the script provided, you can change the registry line from "PDB_INT32ARRAY" to "PDB_INT32" and it'll work. Comment out the message that prints the variable while you're at it to be safe, if you want.
All of these are commented out in the gimpfu convenience module - so maybe they are simply not supported yet?
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/1360.