Re: Python-fu GIMP Layer "parent" property error

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

 



On 20/06/14 03:38, Joao S. O. Bueno wrote:
Issue fixed in master and 2.8 branch.  (It will be generally
available as of gimp 2.8.12)

Thanks for spotting that.

While we are at it, it there an explanation why there are both "layers" and "children" attributes in a gimp.GroupLayer, that return essentially the same thing but with a different class;

>>> image=gimp.image_list()[0]
>>> g=image.layers[0]
>>> print g
<gimp.GroupLayer 'Group3'>
>>> g.children
[<gimp.Layer 'Group 3-2'>, <gimp.Layer 'Group 3-1'>]
>>> g.layers
[<gimp.GroupLayer 'Group 3-2'>, <gimp.GroupLayer 'Group 3-1'>]
>>>

In practice, the "children" method is a bit of a pain when you walk the tree, because the image has "layers" but no "children".

But a gimp.Layer has "children" but no "layers"...

All this is highly confusing... with a single "layers" attribute that always returns a GroupLayer when possible things would be simpler IMHO.
_______________________________________________
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