You are here

(Python-Fu) Flip layer vertically?

I'm trying to flip a layer vertically in the same way that Layer > Transform > Flip Vertically does, but my code doesn't seem to be working.

I've used:

pdb.gimp_drawable_transform_flip_simple(layer, ORIENTATION_VERTICAL, True, 0, False);


pdb.gimp_drawable_transform_rotate_simple(layer, ROTATE_180, True, 0, 0, False);

None of them have shown any results. Am i missing something?

I've tested from the python console. Both:

pdb.gimp_drawable_transform_flip_simple(gimp.image_list()[0].layers[0], ORIENTATION_VERTICAL, True, 0, False)


gimp.image_list()[0].layers[0].transform_flip_simple(ORIENTATION_VERTICAL, True, 0, False)

work for me. Remember, the "layer" parameter must be the layer object, not the layer ID.

-Rob A>

Subscribe to Comments for "(Python-Fu) Flip layer vertically?"