I'm not a dev but AFAIK none of the layer group stuff es exposed in the pdb, so has not been added to script-fu or python.
-Rob A> On 2/6/11, Javier Candeira <jav...@candeira.com> wrote: > First of all, a big thank you to the developers for an great image > editing program. > > I am writing a python-gimp export script for an animation tool, using > Ubuntu 10.10 "maverick" with Gimp version 2.7.3 from this ubuntu PPA, > which is not a nightly build of your devel tree, but close enough: > https://launchpad.net/~matthaeus123/+archive/mrw-gimp-svn > > The workflow expects a gimp document's layers to be exported as a tree > of files, where the directory structure is determined by the > document's layer groups. So, if group "panel_1" has sublayers "foo" > and "bar", and group "panel_2" has sublayers "blargh" and "foobar", > the expected output looks like this: > > $ tree exported_layers > exported_layers > |-- panel_1 > | |-- bar.png > | `-- foo.png > `-- panel_2 > |-- blargh.png > `-- foobar.png > > How can one get the layer objects that correspond to a given group? > It's easy to get layer IDs, it's not clear how to access the layer > object even if one knows its ID. > > The gimp.image.layers sequence only contains the first-level layers > and layer groups, not all the layers. In our document, all layers > belong to a group, so that sequence only contains layer groups. > > When getting the children of a given group, > "pdb.gimp_item_get_children(group)" returns a tuple of IDs. Having > only each layer's ID and not the layer object means one can't, for > instance, make a new layer as a duplicate of an existing one. This > code fails with a type error: > newlayer = pdb.gimp_layer_new_from_drawable(layerID, image) > > Is there something I'm missing/doing wrong, or is this a gap in the > available script-fu methods? > > Thanks, > > Javier Candeira. > _______________________________________________ > Gimp-developer mailing list > Gimp-developer@lists.XCF.Berkeley.EDU > https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer > _______________________________________________ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer