[gimp] script-fu: Use gimp-image-select-item instead of gimp-item-to-selection
- From: Barak Itkin <barakitkin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] script-fu: Use gimp-image-select-item instead of gimp-item-to-selection
- Date: Sun, 20 Feb 2011 22:20:56 +0000 (UTC)
commit b19645db4954a8fc8db83817dc7cd2e45e840efb
Author: Barak Itkin <lightningismyname gmail com>
Date: Mon Feb 21 00:07:19 2011 +0200
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).
plug-ins/script-fu/scripts/add-bevel.scm | 4 ++--
.../script-fu/scripts/beveled-pattern-heading.scm | 6 +++---
plug-ins/script-fu/scripts/burn-in-anim.scm | 4 ++--
plug-ins/script-fu/scripts/carve-it.scm | 10 +++++-----
plug-ins/script-fu/scripts/carved-logo.scm | 10 +++++-----
plug-ins/script-fu/scripts/chrome-it.scm | 4 ++--
plug-ins/script-fu/scripts/circuit.scm | 6 +++---
plug-ins/script-fu/scripts/distress-selection.scm | 2 +-
plug-ins/script-fu/scripts/drop-shadow.scm | 2 +-
plug-ins/script-fu/scripts/perspective-shadow.scm | 2 +-
plug-ins/script-fu/scripts/xach-effect.scm | 8 ++++----
11 files changed, 29 insertions(+), 29 deletions(-)
---
diff --git a/plug-ins/script-fu/scripts/add-bevel.scm b/plug-ins/script-fu/scripts/add-bevel.scm
index 192ea18..fda8256 100644
--- a/plug-ins/script-fu/scripts/add-bevel.scm
+++ b/plug-ins/script-fu/scripts/add-bevel.scm
@@ -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.
diff --git a/plug-ins/script-fu/scripts/beveled-pattern-heading.scm b/plug-ins/script-fu/scripts/beveled-pattern-heading.scm
index f9a7f48..a8737ab 100644
--- a/plug-ins/script-fu/scripts/beveled-pattern-heading.scm
+++ b/plug-ins/script-fu/scripts/beveled-pattern-heading.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/burn-in-anim.scm b/plug-ins/script-fu/scripts/burn-in-anim.scm
index 64a1d5b..a3b46f4 100644
--- a/plug-ins/script-fu/scripts/burn-in-anim.scm
+++ b/plug-ins/script-fu/scripts/burn-in-anim.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/carve-it.scm b/plug-ins/script-fu/scripts/carve-it.scm
index 4127a13..547d1f5 100644
--- a/plug-ins/script-fu/scripts/carve-it.scm
+++ b/plug-ins/script-fu/scripts/carve-it.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/carved-logo.scm b/plug-ins/script-fu/scripts/carved-logo.scm
index c79f788..5577e52 100644
--- a/plug-ins/script-fu/scripts/carved-logo.scm
+++ b/plug-ins/script-fu/scripts/carved-logo.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/chrome-it.scm b/plug-ins/script-fu/scripts/chrome-it.scm
index 9130e55..d291975 100644
--- a/plug-ins/script-fu/scripts/chrome-it.scm
+++ b/plug-ins/script-fu/scripts/chrome-it.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/circuit.scm b/plug-ins/script-fu/scripts/circuit.scm
index 7d99934..9ed5143 100644
--- a/plug-ins/script-fu/scripts/circuit.scm
+++ b/plug-ins/script-fu/scripts/circuit.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/distress-selection.scm b/plug-ins/script-fu/scripts/distress-selection.scm
index 6861754..b347fca 100644
--- a/plug-ins/script-fu/scripts/distress-selection.scm
+++ b/plug-ins/script-fu/scripts/distress-selection.scm
@@ -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))
diff --git a/plug-ins/script-fu/scripts/drop-shadow.scm b/plug-ins/script-fu/scripts/drop-shadow.scm
index 8123fa8..0b05a6c 100644
--- a/plug-ins/script-fu/scripts/drop-shadow.scm
+++ b/plug-ins/script-fu/scripts/drop-shadow.scm
@@ -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)))
diff --git a/plug-ins/script-fu/scripts/perspective-shadow.scm b/plug-ins/script-fu/scripts/perspective-shadow.scm
index 1452f94..1967b6c 100644
--- a/plug-ins/script-fu/scripts/perspective-shadow.scm
+++ b/plug-ins/script-fu/scripts/perspective-shadow.scm
@@ -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)))
diff --git a/plug-ins/script-fu/scripts/xach-effect.scm b/plug-ins/script-fu/scripts/xach-effect.scm
index 99f79db..31d291c 100644
--- a/plug-ins/script-fu/scripts/xach-effect.scm
+++ b/plug-ins/script-fu/scripts/xach-effect.scm
@@ -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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]