mirror of https://github.com/GNOME/gimp.git
Cleanup of recent changes in porting scripts to new API. Marked layer names in carved-logo.scm for translation while at that
This commit is contained in:
parent
0a7e3f929f
commit
fee17f8712
|
@ -101,7 +101,7 @@
|
|||
; Set the selection to the area we want to bevel.
|
||||
;
|
||||
(if (= selection-exists 0)
|
||||
(gimp-item-to-selection pic-layer 2)
|
||||
(gimp-item-to-selection pic-layer CHANNEL-OP-REPLACE)
|
||||
)
|
||||
|
||||
; Store it for later.
|
||||
|
@ -151,7 +151,7 @@
|
|||
;
|
||||
(if (= selection-exists 0)
|
||||
(gimp-selection-none image) ; No selection to start with
|
||||
(gimp-item-to-selection selection 2)
|
||||
(gimp-item-to-selection selection CHANNEL-OP-REPLACE)
|
||||
)
|
||||
; If they started with a selection, they can Select->Invert then
|
||||
; Edit->Clear for a cutout.
|
||||
|
|
|
@ -64,12 +64,12 @@
|
|||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-context-set-background '(127 127 127))
|
||||
(gimp-item-to-selection textl 2)
|
||||
(gimp-item-to-selection textl CHANNEL-OP-REPLACE)
|
||||
(gimp-selection-shrink img 1)
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-item-to-selection textl 2)
|
||||
(gimp-item-to-selection textl CHANNEL-OP-REPLACE)
|
||||
(gimp-selection-shrink img 2)
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
|
@ -82,7 +82,7 @@
|
|||
; Clean up
|
||||
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-item-to-selection textl 2)
|
||||
(gimp-item-to-selection textl CHANNEL-OP-REPLACE)
|
||||
(gimp-selection-invert img)
|
||||
(gimp-edit-clear background)
|
||||
(gimp-selection-none img)
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
(gimp-layer-add-alpha bl-layer)
|
||||
|
||||
;--- add an alpha mask for blending and select it
|
||||
(gimp-item-to-selection bl-layer 2)
|
||||
(gimp-item-to-selection bl-layer CHANNEL-OP-REPLACE)
|
||||
(set! bl-mask (car (gimp-layer-create-mask bl-layer ADD-BLACK-MASK)))
|
||||
(gimp-layer-add-mask bl-layer bl-mask)
|
||||
|
||||
|
@ -148,7 +148,7 @@
|
|||
(- (+ bl-x-off bl-width) after-glow) 0)
|
||||
|
||||
;--- add corona effect
|
||||
(gimp-item-to-selection bl-layer 2)
|
||||
(gimp-item-to-selection bl-layer CHANNEL-OP-REPLACE)
|
||||
(gimp-selection-sharpen img)
|
||||
(gimp-selection-grow img corona-width)
|
||||
(gimp-layer-set-lock-alpha bl-layer FALSE)
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
|
||||
(set! mask-fat (car (gimp-channel-copy mask)))
|
||||
(gimp-image-insert-channel img mask-fat -1 0)
|
||||
(gimp-item-to-selection mask-fat 2)
|
||||
(gimp-item-to-selection mask-fat CHANNEL-OP-REPLACE)
|
||||
(gimp-context-set-brush (carve-brush brush-size))
|
||||
(gimp-context-set-foreground '(255 255 255))
|
||||
(gimp-edit-stroke mask-fat)
|
||||
|
@ -110,10 +110,10 @@
|
|||
(plug-in-emboss RUN-NONINTERACTIVE img mask-emboss 315.0 45.0 7 TRUE)
|
||||
|
||||
(gimp-context-set-background '(180 180 180))
|
||||
(gimp-item-to-selection mask-fat 2)
|
||||
(gimp-item-to-selection mask-fat CHANNEL-OP-REPLACE)
|
||||
(gimp-selection-invert img)
|
||||
(gimp-edit-fill mask-emboss BACKGROUND-FILL)
|
||||
(gimp-item-to-selection mask 2)
|
||||
(gimp-item-to-selection mask CHANNEL-OP-REPLACE)
|
||||
(gimp-edit-fill mask-emboss BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
|
||||
|
@ -144,7 +144,7 @@
|
|||
|
||||
(set! csl-mask (car (gimp-layer-create-mask cast-shadow-layer ADD-BLACK-MASK)))
|
||||
(gimp-layer-add-mask cast-shadow-layer csl-mask)
|
||||
(gimp-item-to-selection mask 2)
|
||||
(gimp-item-to-selection mask CHANNEL-OP-REPLACE)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill csl-mask BACKGROUND-FILL)
|
||||
|
||||
|
@ -153,7 +153,7 @@
|
|||
|
||||
(set! il-mask (car (gimp-layer-create-mask inset-layer ADD-BLACK-MASK)))
|
||||
(gimp-layer-add-mask inset-layer il-mask)
|
||||
(gimp-item-to-selection mask 2)
|
||||
(gimp-item-to-selection mask CHANNEL-OP-REPLACE)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill il-mask BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
|
||||
(set! mask-fat (car (gimp-channel-copy mask)))
|
||||
(gimp-image-insert-channel img mask-fat -1 0)
|
||||
(gimp-item-to-selection mask-fat 2)
|
||||
(gimp-item-to-selection mask-fat CHANNEL-OP-REPLACE)
|
||||
(gimp-context-set-brush (carve-brush brush-size))
|
||||
(gimp-context-set-foreground '(255 255 255))
|
||||
(gimp-edit-stroke mask-fat)
|
||||
|
@ -89,10 +89,10 @@
|
|||
(plug-in-emboss RUN-NONINTERACTIVE img mask-emboss 315.0 45.0 7 TRUE)
|
||||
|
||||
(gimp-context-set-background '(180 180 180))
|
||||
(gimp-item-to-selection mask-fat 2)
|
||||
(gimp-item-to-selection mask-fat CHANNEL-OP-REPLACE)
|
||||
(gimp-selection-invert img)
|
||||
(gimp-edit-fill mask-emboss BACKGROUND-FILL)
|
||||
(gimp-item-to-selection mask 2)
|
||||
(gimp-item-to-selection mask CHANNEL-OP-REPLACE)
|
||||
(gimp-edit-fill mask-emboss BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
|
||||
|
@ -123,7 +123,7 @@
|
|||
|
||||
(set! csl-mask (car (gimp-layer-create-mask cast-shadow-layer ADD-BLACK-MASK)))
|
||||
(gimp-layer-add-mask cast-shadow-layer csl-mask)
|
||||
(gimp-item-to-selection mask 2)
|
||||
(gimp-item-to-selection mask CHANNEL-OP-REPLACE)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill csl-mask BACKGROUND-FILL)
|
||||
|
||||
|
@ -132,7 +132,7 @@
|
|||
|
||||
(set! il-mask (car (gimp-layer-create-mask inset-layer ADD-BLACK-MASK)))
|
||||
(gimp-layer-add-mask inset-layer il-mask)
|
||||
(gimp-item-to-selection mask 2)
|
||||
(gimp-item-to-selection mask CHANNEL-OP-REPLACE)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill il-mask BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
|
@ -144,11 +144,11 @@
|
|||
(gimp-image-remove-channel img mask-highlight)
|
||||
(gimp-image-remove-channel img mask-shadow)
|
||||
|
||||
(gimp-item-set-name layer1 "Carved Surface")
|
||||
(gimp-item-set-name shadow-layer "Bevel Shadow")
|
||||
(gimp-item-set-name highlight-layer "Bevel Highlight")
|
||||
(gimp-item-set-name cast-shadow-layer "Cast Shadow")
|
||||
(gimp-item-set-name inset-layer "Inset")
|
||||
(gimp-item-set-name layer1 _"Carved Surface")
|
||||
(gimp-item-set-name shadow-layer _"Bevel Shadow")
|
||||
(gimp-item-set-name highlight-layer _"Bevel Highlight")
|
||||
(gimp-item-set-name cast-shadow-layer _"Cast Shadow")
|
||||
(gimp-item-set-name inset-layer _"Inset")
|
||||
|
||||
(gimp-display-new img)
|
||||
(gimp-image-undo-enable img)
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
(gimp-item-set-visible bg-layer FALSE)
|
||||
(gimp-item-set-visible shadow FALSE)
|
||||
|
||||
(gimp-item-to-selection mask 2)
|
||||
(gimp-item-to-selection mask CHANNEL-OP-REPLACE)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-selection-translate img offx1 offy1)
|
||||
(gimp-selection-feather img feather)
|
||||
|
@ -157,7 +157,7 @@
|
|||
|
||||
(set! layer-mask (car (gimp-layer-create-mask layer1 ADD-BLACK-MASK)))
|
||||
(gimp-layer-add-mask layer1 layer-mask)
|
||||
(gimp-item-to-selection mask 2)
|
||||
(gimp-item-to-selection mask CHANNEL-OP-REPLACE)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill layer-mask BACKGROUND-FILL)
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
(if (= (car (gimp-selection-is-empty image)) TRUE)
|
||||
(begin
|
||||
(gimp-item-to-selection drawable 2)
|
||||
(gimp-item-to-selection drawable CHANNEL-OP-REPLACE)
|
||||
(set! active-selection (car (gimp-selection-save image)))
|
||||
(set! from-selection FALSE))
|
||||
(begin
|
||||
|
@ -85,7 +85,7 @@
|
|||
(gimp-layer-set-offsets effect-layer select-offset-x select-offset-y)
|
||||
(gimp-selection-none image)
|
||||
(gimp-edit-clear effect-layer)
|
||||
(gimp-item-to-selection active-selection 2)
|
||||
(gimp-item-to-selection active-selection CHANNEL-OP-REPLACE)
|
||||
(gimp-edit-copy drawable)
|
||||
|
||||
(let ((floating-sel (car (gimp-edit-paste effect-layer FALSE))))
|
||||
|
@ -101,7 +101,7 @@
|
|||
(gimp-context-set-foreground '(14 14 14))
|
||||
)
|
||||
|
||||
(gimp-item-to-selection active-selection 2)
|
||||
(gimp-item-to-selection active-selection CHANNEL-OP-REPLACE)
|
||||
(plug-in-maze RUN-NONINTERACTIVE image active-layer 5 5 TRUE 0 seed 57 1)
|
||||
(plug-in-oilify RUN-NONINTERACTIVE image active-layer mask-size 0)
|
||||
(plug-in-edge RUN-NONINTERACTIVE image active-layer 2 1 0)
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
(gimp-layer-scale theLayer theWidth theHeight TRUE)
|
||||
(plug-in-threshold-alpha RUN-NONINTERACTIVE theImage theLayer inThreshold)
|
||||
(plug-in-gauss-iir RUN-NONINTERACTIVE theImage theLayer 1 TRUE TRUE)
|
||||
(gimp-item-to-selection theLayer 2)
|
||||
(gimp-item-to-selection theLayer CHANNEL-OP-REPLACE)
|
||||
(gimp-image-remove-layer theImage theLayer)
|
||||
(if (and (= (car (gimp-item-is-channel inDrawable)) TRUE)
|
||||
(= (car (gimp-item-is-layer-mask inDrawable)) FALSE))
|
||||
|
|
|
@ -146,7 +146,7 @@
|
|||
|
||||
(if (= from-selection TRUE)
|
||||
(begin
|
||||
(gimp-item-to-selection active-selection 2)
|
||||
(gimp-item-to-selection active-selection CHANNEL-OP-REPLACE)
|
||||
(gimp-edit-clear shadow-layer)
|
||||
(gimp-image-remove-channel image active-selection)))
|
||||
|
||||
|
|
|
@ -174,7 +174,7 @@
|
|||
|
||||
(if (= from-selection TRUE)
|
||||
(begin
|
||||
(gimp-item-to-selection active-selection 2)
|
||||
(gimp-item-to-selection active-selection CHANNEL-OP-REPLACE)
|
||||
(gimp-edit-clear shadow-layer)
|
||||
(gimp-image-remove-channel image active-selection)))
|
||||
|
||||
|
|
|
@ -69,14 +69,14 @@
|
|||
|
||||
(gimp-selection-none image)
|
||||
(gimp-edit-clear hl-layer)
|
||||
(gimp-item-to-selection active-selection 2)
|
||||
(gimp-item-to-selection active-selection CHANNEL-OP-REPLACE)
|
||||
|
||||
(gimp-context-set-background hl-color)
|
||||
(gimp-edit-fill hl-layer BACKGROUND-FILL)
|
||||
(gimp-selection-translate image hl-offset-x hl-offset-y)
|
||||
(gimp-edit-fill hl-layer BACKGROUND-FILL)
|
||||
(gimp-selection-none image)
|
||||
(gimp-item-to-selection active-selection 2)
|
||||
(gimp-item-to-selection active-selection CHANNEL-OP-REPLACE)
|
||||
|
||||
(set! mask (car (gimp-layer-create-mask hl-layer ADD-WHITE-MASK)))
|
||||
(gimp-layer-add-mask hl-layer mask)
|
||||
|
@ -94,13 +94,13 @@
|
|||
(gimp-image-insert-layer image shadow-layer -1 -1)
|
||||
(gimp-selection-none image)
|
||||
(gimp-edit-clear shadow-layer)
|
||||
(gimp-item-to-selection active-selection 2)
|
||||
(gimp-item-to-selection active-selection CHANNEL-OP-REPLACE)
|
||||
(gimp-selection-translate image ds-offset-x ds-offset-y)
|
||||
(gimp-context-set-background ds-color)
|
||||
(gimp-edit-fill shadow-layer BACKGROUND-FILL)
|
||||
(gimp-selection-none image)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE image shadow-layer ds-blur TRUE TRUE)
|
||||
(gimp-item-to-selection active-selection 2)
|
||||
(gimp-item-to-selection active-selection CHANNEL-OP-REPLACE)
|
||||
(gimp-edit-clear shadow-layer)
|
||||
(gimp-image-lower-item image shadow-layer)
|
||||
|
||||
|
|
Loading…
Reference in New Issue