Etch Prep Script

 

Prepare the image for etching.

  1. Duplicate the background image to a new layer.
  2. Hide the original background image.
  3. Place a bright green backdrop to etch against (so you can see easilly where you've cut) under the duplicate background.
  4. Switch to the newly created duplicate background.
  5. Switch to the eraser tool.
(define (script-fu-etch-prep image drawable)
; duplicate the background.
(let*
((dup-layer (car (gimp-layer-copy drawable 1))))
(gimp-image-add-layer image dup-layer 0)

; turn off the background
(gimp-drawable-set-visible drawable 0)

; make a new layer and add it in at pos 1 (middle).
(let*
((new-layer (car (gimp-layer-new image (car (gimp-image-width image)) (car (gimp-image-height image)) 0 "Cutout Pad" 100 0))))
(gimp-image-add-layer image new-layer 1)

; set the colour
(gimp-palette-set-foreground (48 255 0)) ; dayglo green
(gimp-edit-bucket-fill new-layer 0 0 100 255 FALSE 1 1)

new-layer)

;switch back to the top layer
(gimp-image-set-active-layer image dup-layer)


dup-layer)
)


; Register the function with the GIMP:

(script-fu-register "script-fu-etch-prep"
_"Prepare for Etching"
"Prepare for Etch"
"Fred Flintstone"
"Fred Flintstone"
"2008-02-21"
"RGB* GRAY*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
)

(script-fu-menu-register "script-fu-etch-prep"
_"<Image>/Script-Fu/Etching")