;; -*-scheme-*- ;; simple layer new script, Alan Horkan 2004 ;; so long as remove these comments from your script ;; feel free to use it for whatever you like. ;; fixed, replaced RGBA_IMAGE with RGBA-IMAGE for Gimp 2 (define (script-fu-layers-new-layer image drawable layer-name mode opacity) (let* ((width (car (gimp-image-width image))) (height (car (gimp-image-height image))) (new-layer (car (gimp-layer-new image width height RGBA-IMAGE layer-name opacity mode)))) (gimp-image-undo-group-start image) (gimp-image-add-layer image new-layer -1) (gimp-displays-flush) (gimp-image-undo-group-end image) ) ) (script-fu-register "script-fu-layers-new-layer" _"/Layer/New/Layer..." "Layer, New Layer. A script to provide a New Layer.. menu item in the Layer menu. When you have limited screen space it is more convenient to have a transient New Layer Dialog instead of having the Layers Palette alway open, taking up space. Useful if you want to have your own custom New Layer... dialog without needing to compile anything. " "Public Domain. No copyright. " ; copyright "Alan Horkan. " ; author "April 2004. " ; date "" ; supported image types SF-IMAGE "Image" 0 SF-DRAWABLE "Drawable" 0 SF-STRING _"Name" "Layer" ; 'New' in the layer name is just clutter SF-OPTION _"Mode" '( _"Normal " _"Dissolve " _"Behind " _"Multiply " _"Screen " _"Overlay " _"Difference " _"Addition " _"Subtract " _"Darken " _"Lighten " _"Hue " _"Saturation " _"Colour " _"Value " _"Divide ") SF-ADJUSTMENT _"Opacity" '(100 0 100 1 10 0 0) )