How to create a GimpFloatArray in Python plugin?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Specifically, to pass as third arg to Gimp.PDB.gimp_pencil(layer, 4 line).
Said argument should be GimpFloatArray according to PDBBrowser.

I create a GimpValueArray to pass args to the pdb.  To create a GValue for
the third arg, I tried:

GObject.Value(Gimp.FloatArray.__gtype__, (1.0, 1.0, 1.0, 1.0)

which throws exception .... Expected: Boxed.
Thrown by pygobject/gi/pygi-value.c about line 556.
At line 537, it seems like it should work if G_VALUE_HOLDS(value,
G_TYPE_ARRAY) for GimpFloatArray gtype.
My understanding is that PyGObject would then create a GArray from the
Python list of floats for the value of the GValue.

My best guess is Gimp is missing GI annotations or implementation for
GimpFloatArray.

Using Gimp 2.99, I am porting GimpFu.

There might be a related problem receiving GimpInt32Array *from* Gimp (not
*to* Gimp as above.)

I suppose I could try the Lua or Scheme binding.
_______________________________________________
gimp-developer-list mailing list
List address:    gimp-developer-list@xxxxxxxxx
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list



[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux