My very first script. I read through a bunch of tutorials, and can't figure out what I'm doing wrong.
I simply want to add a text layer to the current image. When I run the script, nothing appears to happen.
Eventually, I'll build this up to something that will resize an image, and put a caption in the new whitespace at the bottom. But this is my first hurdle.
Running GIMP 2.6.11 on Win 7.
Any insight would be appreciated. Thanks.
(define (script-fu-foobar inImg inDrawable)
(gimp-context-push)
(gimp-image-undo-group-start inImg)
(let*
(
(theTextLayer (gimp-text-layer-new inImg "hello" "Sans" 32 PIXELS))
(gimp-image-add-layer inImg theTextLayer 0)
)
)
(gimp-image-undo-group-end inImg)
(gimp-displays-flush)
(gimp-context-pop)
)
(script-fu-register
"script-fu-foobar" ;func name
"Caption" ;menu label
"" ;description
"" ;author
"" ;copyright notice
"" ;date created
"RGB, RGBA" ;image type that the script works on
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
)
(script-fu-menu-register "script-fu-foobar" "<Image>/Stuff")