Re: [Gimp-user] Arrays in Python
- From: Ofnuts <ofnuts gmx com>
- To: gimp-user-list gnome org
- Subject: Re: [Gimp-user] Arrays in Python
- Date: Mon, 9 Apr 2018 23:06:59 +0200
On 04/09/18 21:09, Beinsezii wrote:
No matter what I try, I can't get the plugin to load while using an array in
either the input params or return values.
Taken straight from the 'gimpenums' pydocs, I should have access to
"PDB_INT32ARRAY"
"PDB_FLOATARRAY"
and a bunch others, but using any of them causes the script to fail to load in
GIMP. And just to make *absolutely sure* it wasn't a typo, I tried their numeric
values, too.
I can't just use a bajillion i32's or whatever since the Frankenstein's Monster
of a script I'm working on takes an unknown amount of numbers as an input. Could
be anywhere from a a few to a few thousand depending on how long you want your
PC to act as a space heater.
There's a 65% chance I'll re-do the main function of the script in a way where
it wouldn't take arrays for layer return purposes, but I'll probably come across
the array problem in future scripts anyway.
I've included an example script. What it *should* be able to do is print out
whatever array you put into it with something like the python console or another
script, but it doesn't even load. It'll appear under "<Image>/Beinsezii/" if it
*does* load.
Attachments:
* http://www.gimpusers.com/system/attachments/871/original/bsz_array_input_debug.py
AFAIK you can't, but anyway how do you expect the user to enter the
bazillion numbers? If you want that many numbers just ask for a file
name and read the file.
Or maybe your array can be pixels values in a layer (these are easy to
get in Python) in which case the user would just specify a second layer.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]