Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] How to modify this script-fu?
#1
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 ?
Reply
#2
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
)
Reply
#3
Thank you ! I didn' manage to do that , simply beacouse I forgot the second step you mentionned... :/

Now, it's perfect !
Reply


Forum Jump: