Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error: Not enough arguments?
#5
Hi everyone,  I hope everything is fine and your family, be safe. I want to thank you for your respond @ the Gimp-forum.net. You explained in simple ways how to write a GIMP script to an old man that is trying to learn at this age, the script-fu world [Image: hihi.gif] .

I created my first script out a tutorial I found in deviantart.com called "Create a seamless Wood Slat Pattern with GIMP 2.10" by Conbagui. I almost done with the script, but I have an error "unbound variable: drawable" when the "plug-in-make-seamless" runs. What am I missing? I uploaded the image and the code. Thank you once again.

https://imgur.com/kKnzQOC



Code:
; following steps in seamless Wood Slat Pattern tutorial by conbagui
; found at link:http://fav.me/ddss6bx
; author: conbagui
; date: 4/20/20

(define (script-fu-seamless-wood-slat-pattern)
   (let* (
       (theImage  (car (gimp-image-new 500 500 RGB)))
       (theLayer (car (gimp-layer-new theImage 500 500 RGB-IMAGE "Wood" 100 LAYER-MODE-NORMAL)))
        (theDesign (car (gimp-layer-new theImage 500 500 RGB "Design" 100 LAYER-MODE-NORMAL)))
        (theDivisions (car (gimp-layer-new theImage 500 500 RGB "theDivisions" 100 LAYER-MODE-NORMAL)))
        )
        ;create the image,
       (gimp-image-undo-disable theImage)    ; Disable undo during the image creation
       (gimp-image-insert-layer theImage theLayer 0 0)
       (gimp-drawable-fill theLayer FILL-WHITE)
       (gimp-display-new theImage)
        
        ;set the fg and bg colors,
        (gimp-context-set-foreground '(232 195 151))
        (gimp-context-set-background '(184 137 82))
        (gimp-context-set-gradient-fg-bg-rgb)
        
        ;add plasma2 and create wood design
        (plug-in-plasma2  RUN-NONINTERACTIVE theImage theLayer 16 0 0 0 0 0.00 1.00 2 "FG to BG")
        (plug-in-ripple RUN-NONINTERACTIVE theImage theLayer 320 800 0 1 1 TRUE TRUE)
       
        ;rotate the layer
        (gimp-image-rotate theImage ROTATE-90)
        (gimp-context-set-foreground '(191 164 132))
        
        ;add new layer
        (gimp-image-add-layer theImage theDesign -1)
        (gimp-drawable-fill theDesign FILL-FOREGROUND)
        (gimp-layer-set-mode theDesign LAYER-MODE-OVERLAY)
        (plug-in-hsv-noise RUN-NONINTERACTIVE theImage theDesign 8 2 4 255)
        (plug-in-wind RUN-NONINTERACTIVE theImage theDesign 15 2 45 0 0)
        (plug-in-wind RUN-NONINTERACTIVE theImage theDesign 15 3 45 0 0)
        (gimp-image-merge-down theImage theDesign 1)
        (plug-in-make-seamless RUN-NONINTERACTIVE theImage drawable)

           
               (gimp-image-undo-enable theImage)    ; Enable undo for future modifications

    )
         
   
)

(script-fu-register
   "script-fu-seamless-wood-slat-pattern"                        
   "<Image>/File/Create/Seamless wood slat pattern..."
    "Creates a wood pattern"    
    "Pocholo"                            
    "Pocholo"
    "March 2020"                          
    ""
)
Reply


Messages In This Thread
Error: Not enough arguments? - by Pocholo - 04-18-2020, 03:52 PM
RE: Error: Not enough arguments? - by Ofnuts - 04-18-2020, 04:12 PM
RE: Error: Not enough arguments? - by JimmyMarco - 04-19-2020, 07:44 AM
RE: Error: Not enough arguments? - by Ofnuts - 04-19-2020, 09:18 AM
RE: Error: Not enough arguments? - by Pocholo - 04-21-2020, 03:17 AM
RE: Error: Not enough arguments? - by Ofnuts - 04-21-2020, 06:28 AM
RE: Error: Not enough arguments? - by Kevin - 04-21-2020, 12:34 PM
RE: Error: Not enough arguments? - by Pocholo - 04-21-2020, 07:01 PM

Forum Jump: