2010/6/2 Jason Simanek <jsima...@gmail.com>:
> A new layer is non-destructive. Why is there a need for this other type
> of layer? The name 'floating selection' isn't even accurate. This is a
> collection of pixels. It is not a selection. A selection is an ephemeral
> mask not a collection of specific pixels.
> . . .

> Jason Simanek

Until some time ago, I also doubt the usefulness of this kind of
layer. Recently, however, I discovered that the floating selections
can be really handy, especially when they are put into action within
the scripts. Often, indeed, with the purpose of obtaining a specific
type of effect for a drawable through the Script-Fu language, it is
necessary to make the script perform, one or more times, the fusion
between the starting drawable and a new drawable, which is usually a
modified copy of the first one. This combination can be accomplished
either by merging the created drawable down or by anchoring it towards
the original one, depending, respectively, on whether it has been
added as new layer/channel or pasted as floating selection.

But the first approach can be slightly destructive about the
properties the initial drawable had - like its ID, opacity, linked
state, layer's mask (if present), "lock alpha channel" setting,
combination mode -, because the eventual drawable derived from the
fusion won't keep any of them. Particularly, the loss of the ID voids
the variable it was been stored in, so it becomes essential to
re-define it every time like this:
(define drw (car (gimp-image-get-active-drawable img))).

The anchorage of a floating selection, instead, allows to really
maintain the integrity of the drawable to which such floating object
belongs, including all the important features listed above.
Gimp-developer mailing list

Reply via email to