-----BEGIN PGP SIGNED MESSAGE-----
a short update what I did during the last few weeks.
* I started with moving the package structure to a more hierarchical one. With
a gimp package on top and several subpackages like gimp.colors, gimp.enums,
* I also changed gimp.enums to use GEnum objects instead integers for the enums.
* Gradient, Brush, Palette and Pattern objects have been mapped in pure python.
Although I'm not that happy with gimp.Gradient and gimp.Palette:
The problem is that in python you can not copy a object implicitly by value.
Assigning a object to a name copies the reference and increases the refcount.
Image the following code:
palette.entries = palette.entries
palette.entries.color = gimp.colors.RGB(0, 0, 0)
From a python point of view it should change the color of entry 0 and 1. But
in gimp palette entries can only accessed by their index. So I ended up
writing some code that tracks which GradientEntry is assigned to what indices.
The problem starts when a script uses gimp.pdb.gimp_palette_delete_entry in
parallel. A Gradient object can not be notified when a entry is deleted so
the indices get all wrong.
Something similar is true for the gradient wrapper.
* I added a gimp.context module that wraps all the gimp_context_* functions.
* Added wrapper code for most of the missing gimp widgets. So gimp.ui is
almost complete now except for a problem with Preview objects.
Also some methods need a more pythonic interface.
* Added a unittest that test if the wrapped widget methods at least do not
crash and accept the right parameters.
* Additionally I found and fixed some bugs in pygimp.
What comes next:
* Do something about the problems with gimp.Gradient and gimp.Palette described
* I have been looking into wrapping libgimpmath. But I'm not sure how to handle
it. The matrix and vectors code looks incomplete and inconsistent. Some
objects are GObjects others are not.
* The pygobject system complains when a object is not constructable with
properties. So I'll look into porting the widgets that don't support it, but
I will need some advice how to it the right way.
* In my opinion the error messages in pygimp-pdb are a bit unspecific. So I'll
try to rewrite parts in pygimp-pdb.c to give better error messages.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Gimp-developer mailing list