2010/6/3 Rob Antonishen <rob.antonis...@gmail.com>:
> I've been following this with interest.
>
> To play with it, I created a script:
> http://ffaat.pointclark.net/incoming/scripts/paste-as-new-centered.scm
>
> It registers as Edit->Paste As->New Centered Layer
>
> -Rob A>
>

Thank you, Rob, for creating this useful script.

If I may, I would like to suggest a little improvement aimed to get
rid of the only snag the script could encounter, occurring when the
active drawable is a floating selection. Indeed, although the event of
pasting into such a "quasi-layer" is surely rare and atypical, all the
same this operation alters both the floating selection and the
drawable it is attached to, since eventually the former will be
anchored to the latter and its content replaced by the pasted object.

So, it might be worthwhile forcing the script to ignore floating
selections, for instance with this initial condition:

(case (car (gimp-layer-is-floating-sel active-layer))
   ((1)
      (gimp-message "The script doesn't affect floating selections.")
      (quit)
   )
)

In order to make the script effective even on any floating selection,
another solution might be to transform at first this object into a
layer (through the "gimp-floating-sel-to-layer" procedure), but the
problem of this choice is that such procedure returns an error if the
floating selection belongs to a channel or a layer mask.
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Reply via email to