D 2013-05-24T17:25:21.385
L sg-isolate
P e023aa867d2d7d7f3fa1599e109f6619180355e0
U saulgoode
W 1625
- Command:
- Isolate
- Menu:
- "/Edit/Isolate"
- PDB Name:
- script-fu-sg-isolate
- Download:
- [http://chiselapp.com/user/saulgoode/repository/script-fu/artifact/44019253cbb72ae74415b72a81700f9bfdd0da7f|sg-isolate.scm] (after the page appears, click on the "Download" command)
- License:
- [copyright|GPLv2+]
- Description:
- If there is a selection, running this script will result in the contents of the current drawable being deleted everywhere except within the selection. This is basically a convenient substitute for the sequence Select->Invert, Edit->Clear, Select->Invert except that layers without an alpha channel will have one added (resulting in transparency rather than background fill).
In addition, if the currently active drawable is a layermask or a channel, the mask or channel is filled with a grayscale copy of the current selection.
I find using this function after duplicating a layer is often preferable to floating a selection or doing a copy/paste. Floating a selection removes the content from the original layer and can sometimes re-position the copied region. Both floating and copying result in the new layer being placed at the top of the layerstack (whereas duplicating a layer places it directly above the original). Using "Edit->Paste As->New Layer" positions the new layer above the original in the layerstack, but also relocates the new layer to the upper-left corner of the image (which is likewise not often desirable).
Z 3c80a619f5d8a04971ff712273d777d5