GIMP Script-fu

sg-float-layer
Login

sg-float-layer

Command:
Float layer
Menu:
"<Image>/Layer/Float Layer"
"<Layers>/Float Layer"
PDB Name:
script-fu-sg-float-layer
Download:
sg-float-layer.scm (after the page appears, click on the "Download" command)
License:
GPLv2+

Description:

Create a floating selection from the entire layer; destroying any existing selection. This allows repositioning the layer without repositioning the layermask (works for other transformations as well).

This is a useful technique for interactively cropping/transforming a layer so that it is presented within a masked window in a certain location on the image. While a similar effect could be achieved by performing a "Select->All" and then floating the selection, regions of the layer outside of the image will be "lost" and unavailable during the repositioning. By using this "Float layer" command, the entire layer is available as the floated selection. This is often important for such use cases where the layer being positioned is much larger than final image.

NOTE: When the floated layer is anchored, any regions outside the bounds of the original layer are lost. Also, any selection mask that is present initially is lost.