mirror of https://github.com/GNOME/gimp.git
script-fu: Use gimp-image-select-item instead of gimp-item-to-selection
gimp-item-to-selection does not seem to exist (in the PDB), so update to the correct function gimp-image-select-item (which also takes the image as a parameter).
This commit is contained in:
parent
56dd924b9c
commit
b19645db49
|
@ -101,7 +101,7 @@
|
|||
; Set the selection to the area we want to bevel.
|
||||
;
|
||||
(if (= selection-exists 0)
|
||||
(gimp-item-to-selection pic-layer CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item image CHANNEL-OP-REPLACE pic-layer)
|
||||
)
|
||||
|
||||
; 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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item image CHANNEL-OP-REPLACE selection)
|
||||
)
|
||||
; 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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE textl)
|
||||
(gimp-selection-shrink img 1)
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-item-to-selection textl CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE textl)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE textl)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE bl-layer)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE bl-layer)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE mask-fat)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE mask-fat)
|
||||
(gimp-selection-invert img)
|
||||
(gimp-edit-fill mask-emboss BACKGROUND-FILL)
|
||||
(gimp-item-to-selection mask CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE mask)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE mask)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE mask)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE mask-fat)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE mask-fat)
|
||||
(gimp-selection-invert img)
|
||||
(gimp-edit-fill mask-emboss BACKGROUND-FILL)
|
||||
(gimp-item-to-selection mask CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE mask)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE mask)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE mask)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill il-mask BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
(gimp-item-set-visible bg-layer FALSE)
|
||||
(gimp-item-set-visible shadow FALSE)
|
||||
|
||||
(gimp-item-to-selection mask CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE mask)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE mask)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item inImage CHANNEL-OP-REPLACE theLayer)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
|
||||
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
|
||||
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
|
||||
(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 CHANNEL-OP-REPLACE)
|
||||
(gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
|
||||
(gimp-edit-clear shadow-layer)
|
||||
(gimp-image-lower-item image shadow-layer)
|
||||
|
||||
|
|
Loading…
Reference in New Issue