Group: The GIMP


Scripts for GIMP 2.4


Roberto Ballerini - traveling
08 Nov 2007 - 2 comments - 961 visits- Permalink   |   Translate title into English

A lot of old Script-Fu scripts aren't working in version 2.4 because it integrates a new Scheme interpreter.
Let me know if you have a script you want translated for Gimp 2.4: perhaps I can do ti.
Comments
 Roberto Ballerini - traveling
Roberto Ballerini -…
Here you are:

(define (script-fu-orton-effect theImage theLayer blurAmount)

;Start undo group
(gimp-image-undo-group-start theImage)

;Copy the layer
(let*
(
(copy1 (car (gimp-layer-copy theLayer 0)))
(copy2 (car (gimp-layer-copy theLayer 0)))
(Orton-sharp)
(copy3)
)

;Add the layers
(gimp-image-add-layer theImage copy1 -1)
(gimp-image-add-layer theImage copy2 -1)


;Change the layers mode to Screen (4)
(gimp-layer-set-mode copy2 4)

;Merge the copy2 down
(set! Orton-sharp (car (gimp-image-merge-down theImage copy2 0)))
;Set layers name
(gimp-drawable-set-name Orton-sharp "Orton Sharp")
;Create an new copy
(set! copy3 (car (gimp-layer-copy Orton-sharp 0)))
;Set layers name
(gimp-drawable-set-name copy3 "Orton Blur")
;Add the layer
(gimp-image-add-layer theImage copy3 -1)
;Gauss
(if (> blurAmount 0)
(plug-in-gauss 1 theImage copy3 blurAmount blurAmount 0)
)
;Change layers mode to multipicate (3)
(gimp-layer-set-mode copy3 3)

;EO undo group
(gimp-image-undo-group-end theImage)

;refresh screen
(gimp-displays-flush)

)
)


(script-fu-register "script-fu-orton-effect"
_"/Filters/Enhance/Orton effect..."
"Performs a Orton Effect on the open image"
"Martin Conrad (Process)"
"2007, Martin Conrad (Process)"
"Apr. 11 2007"
"*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-ADJUSTMENT _"Blur:" '(5 0 500 1 1 1 0)
)


--
Coming from a group home page (?)
16 years ago.
 Roberto Ballerini - traveling
Roberto Ballerini -…
NOTE: if you install FXFoundry, you have to rename from script-fu-orton-effect to something else, to avoid a name clash
16 years ago.

You must be a member of this group to reply to this topic. (Join?)