You are here

How to get the Layer Names in Pyton-fu

I need a plugin to merge all layers down.
Try the following code:

layer = pdb.gimp_image_get_active_layer(img)
anz_lay, layer_arr = pdb.gimp_image_get_layers(img)
for a in range(anz_lay) :
layer = layer_arr[a]
pdb.gimp_image_merge_down(img, layer, 1)

this results in an errormsg:
pdb.gimp_image_merge_down(img, layer, 1)
TypeError: wrong parameter type

thats correct because layer_arr contains "7, 8, 9, 10, 11"
how can I get the names of the layers ??
thanks in advance
best regards

Subscribe to Comments for "How to get the Layer Names in Pyton-fu"