rtsnhatl
June 16th, 2009, 11:45 AM
What am I missing in this Python script, I am trying to write a simple script to hide or unhide all of the layers in an image. I can only seem to get the active layer to hide. Below is the function I am using, must be something I am missing?
Thanks,
Bob
def hide_layers( image, drawable, hide ):
layers = image.layers #get image layers
for layer in layers:
#gimp_drawable_is_layer(layer)
pdb.gimp_image_set_active_layer(image, layer)
pdb.gimp_drawable_set_visible(drawable, hide)
Thanks,
Bob
def hide_layers( image, drawable, hide ):
layers = image.layers #get image layers
for layer in layers:
#gimp_drawable_is_layer(layer)
pdb.gimp_image_set_active_layer(image, layer)
pdb.gimp_drawable_set_visible(drawable, hide)