After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 795141 - PDB Arrays Don't Work
PDB Arrays Don't Work
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: Gimp-Python
unspecified
Other Windows
: Normal normal
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2018-04-10 21:05 UTC by jrya12
Modified: 2018-05-24 19:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Takes an array as an input, and sends it back as a gimp_message(). (1.53 KB, text/plain)
2018-04-10 21:05 UTC, jrya12
Details

Description jrya12 2018-04-10 21:05:18 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.
Comment 1 Michael Natterer 2018-04-10 23:05:58 UTC
I have not much clue about python, but gimp-message takes a string,
why do you think you can pass it an array?
Comment 2 jrya12 2018-04-11 05:23:54 UTC
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.
Comment 3 Michael Schumacher 2018-04-18 06:57:29 UTC
All of these are commented out in the gimpfu convenience module - so maybe they are simply not supported yet?
Comment 4 GNOME Infrastructure Team 2018-05-24 19:27:57 UTC
-- 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.