Gimp-Forum.net

Full Version: [Solved] How to modify this script-fu?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I use this script:





Code:
((define (script-fu-logo inImage inLogo )
(let*
(
(calque (car (gimp-file-load-layer 1 inImage inLogo)))
)
(gimp-image-add-layer inImage calque 0)
(gimp-image-flatten inImage)
) ; fin let*
) ; fin define


(script-fu-register "script-fu-logo"; name
"<Image>/MyScripts/logo" ; position in menu
"test script"; commentary
""; author
"" ;
"" ;date
"" ;
SF-IMAGE "inImage" 0
SF-FILENAME "inLogo" (string-append "" gimp-data-dir "/scripts/images/logo.png")
)

I wish that this script only use the logo.png, without asking it.

Do you know how to do that ?
In that case
  1. Remove the SF-FILENAME paramter from the script-fu-register section
  2. Remove the inLogo parameter from the define of script-fu-logo
  3. Assign inLogo to the fixed filepath
Code:
((define (script-fu-logo inImage)
(let*
(
 (inLogo (string-append "" gimp-data-dir "/scripts/images/logo.png"))
(calque (car (gimp-file-load-layer 1 inImage inLogo)))
)
(gimp-image-add-layer inImage calque 0)
(gimp-image-flatten inImage)
) ; fin let*
) ; fin define


(script-fu-register "script-fu-logo"; name
"<Image>/MyScripts/logo" ; position in menu
"test script"; commentary
""; author
"" ;
"" ;date
"" ;
SF-IMAGE "inImage" 0
)
Thank you ! I didn' manage to do that , simply beacouse I forgot the second step you mentionned... :/

Now, it's perfect !