You are here

I need help with a basic script.

I'm new to using script-fu and honestly don't need to use it too often. I was hoping i could get some help with making a script. What i need to do is have a script that follows this order: fuzzy selector, grow 2px, lower 1 layer, flood fill FG color, raise one layer.

I tried making my own script but realized that i fail terribly at it.
Here is what i tried, sorry if it hurts to look at >.<

(
define
(quick-fill image drawable)
(gimp-undo-push-group-start image)
(
let* ((layer (car (gimp-image-get-active-layer image)))
(x (car (gimp-drawable-offsets layer)))
(y (cadr (gimp-drawable-offsets layer))))
(gimp-selection-grow image 2)
(gimp-image-set-active-layer image (aref (cadr (gimp-image-get-layers image)) 1))
(gimp-bucket-fill drawable FG-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
(gimp-image-set-active-layer image (aref (cadr (gimp-image-get-layers image)) 0))
)
(gimp-undo-push-group-end image)
(gimp-displays-flush))

Subscribe to Comments for "I need help with a basic script."