So i found these cool scripts here
http://the-gimp.deviantart.com/art/Adju ... rs-1473128But everytime i use any of them i get this same error "set! - unbound variable theLayer"
So i looked at the scripts and this is what one the "pattern adjustment script" - looks like
;
; pattern-fill-adjustment-layer
;
; Creates a pattern fill "adjustment layer".
;
; Alexander Melcher (a.melchers@planet.nl)
; At xMedia, The Netherlands
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
; Define the function
(define (script-fu-pattern-fill-adjustment-layer inImage
inLayer
inPattern
inReplaceLayer
)
; Make sure to work on the layer, not the layer mask
(if (= (car (gimp-drawable-is-layer-mask inLayer)) TRUE)
(set! theLayer (car (gimp-image-get-active-layer inImage)))
(set! theLayer inLayer)
)
; Group undo information
(gimp-undo-push-group-start inImage)
; Create the adjustment layer
(set! adjustment (car (gimp-layer-new inImage
(car (gimp-image-width inImage))
(car (gimp-image-height inImage))
(car (gimp-drawable-type-with-alpha theLayer))
"Pattern Fill"
100 0)))
(if (= inReplaceLayer TRUE)
(begin
(gimp-layer-set-linked adjustment
(car (gimp-layer-get-linked theLayer)))
(gimp-layer-set-opacity adjustment
(car (gimp-layer-get-opacity theLayer)))
)
()
)
; Create the effect
(set! currentSelection (car (gimp-selection-save inImage)))
(gimp-image-remove-channel inImage currentSelection)
(gimp-selection-all inImage)
(gimp-edit-clear adjustment)
(set! currentPattern (car (gimp-patterns-get-pattern)))
(gimp-patterns-set-pattern inPattern)
(gimp-bucket-fill adjustment 2 0 100 255 FALSE 0 0)
(gimp-patterns-set-pattern currentPattern)
(gimp-image-add-layer inImage adjustment -1)
(if (= inReplaceLayer TRUE)
(begin
(gimp-image-remove-layer inImage theLayer)
(if (= (car (gimp-drawable-is-layer-mask inLayer)) TRUE)
(gimp-selection-load inLayer)
(if (= (car (gimp-layer-mask theLayer)) -1)
(gimp-selection-none inImage)
(gimp-selection-load (car (gimp-layer-mask theLayer)))
)
)
)
(gimp-selection-load currentSelection)
)
; Add a layer mask
(if (= (car (gimp-selection-is-empty inImage)) FALSE)
(begin
(set! adjustmentMask (car (gimp-layer-create-mask adjustment 1)))
(set! currentFgColor (car (gimp-palette-get-foreground)))
(gimp-palette-set-foreground '(255 255 255))
(gimp-bucket-fill adjustmentMask 0 0 100 255 FALSE 0 0)
(gimp-palette-set-foreground currentFgColor)
)
(set! adjustmentMask (car (gimp-layer-create-mask adjustment 0)))
)
(gimp-image-add-layer-mask inImage adjustment adjustmentMask)
(if (= inReplaceLayer TRUE)
(gimp-selection-load currentSelection)
()
)
; Group undo information
(gimp-undo-push-group-end inImage)
; Force update
(gimp-displays-flush)
; Return
(list 1)
)
; Register script-fu-pattern-fill-adjustment-layer
(script-fu-register
"script-fu-pattern-fill-adjustment-layer"
"<Image>/Adjustment Layers/Pattern Fill"
"Creates a pattern fill \"adjustment layer\"."
"Alexander Melchers"
"2002, Alexander Melchers, xMedia"
"7th November 2002"
"RGB* GRAY*"
SF-IMAGE "The Image" 0
SF-DRAWABLE "The Layer" 0
SF-PATTERN "Pattern" "Pine?"
SF-TOGGLE "Replace Layer" FALSE
)
All of the scripts give the same error so i imagine it to be a fix that can be applied globally for all of them?
So i was hoping one of you awesome script writers could tell me how to fix them so they work?
I think they would be an awesome addition to Gimp.
Thanks