Reputation: 55
GIMP script-fu-newbie here.
I can't see anywhere in the documentation of GIMP 2.6 why this shouldn't work:
;Define the main function
(define (script-fu-rubber-stamp img drawable)
(gimp-image-undo-group-start img)
(plug-in-randomize-pick 1 img drawable 90 7 FALSE 10)
(plug-in-oilify 1 img drawable 5 0)
(gimp-image-undo-group-end img)
)
;Register the script w/ GIMP.
(script-fu-register
"script-fu-rubber-stamp" ;func name
"Rubber Stamp" ;menu label
"Image to rubberstamp" ;description
"Me" ;author
"Copyright 2011, Me" ;copyright notice
"Nov. 2011" ;date created
"" ;image type that the script works on
)
(script-fu-menu-register "script-fu-rubber-stamp" "<Image>/Script-Fu")
It shows up in GIMP, but when I run it, it says:
Error: not enough arguments
But if I look in the Script-FU Console, it seems the be right... unless the error of my ways is not in the functioncalls...
Upvotes: 1
Views: 1693
Reputation: 55
ARGH naturally... script-fu-register needs to say what img and drawable is:
(script-fu-register
"script-fu-rubber-stamp" ;func name
"Rubber Stamp" ;menu label
"Image to rubberstamp" ;description
"Me" ;author
"Copyright 2011, Me" ;copyright notice
"Nov. 2011" ;date created
"" ;image type that the script works on
SF-IMAGE "Input Image" 0
SF-DRAWABLE "Input Drawable" 0
)
Upvotes: 2