Re: [Gimp-developer] Python-fu GIMP Layer "parent" property error

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.

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