[gimp] script-fu: Use the new gimp-item api where possible



commit 03f1034a9773232f54a98ef684b49342c31b8c82
Author: Barak Itkin <lightningismyname gmail com>
Date:   Tue Aug 3 00:13:51 2010 +0300

    script-fu: Use the new gimp-item api where possible

 plug-ins/script-fu/scripts/3d-outline.scm         |   12 +++++-----
 plug-ins/script-fu/scripts/add-bevel.scm          |    2 +-
 plug-ins/script-fu/scripts/addborder.scm          |    2 +-
 plug-ins/script-fu/scripts/alien-neon-logo.scm    |    2 +-
 plug-ins/script-fu/scripts/basic2-logo.scm        |    2 +-
 plug-ins/script-fu/scripts/blend-anim.scm         |   26 ++++++++++----------
 plug-ins/script-fu/scripts/burn-in-anim.scm       |   16 ++++++------
 plug-ins/script-fu/scripts/carve-it.scm           |   14 +++++-----
 plug-ins/script-fu/scripts/carved-logo.scm        |   10 ++++----
 plug-ins/script-fu/scripts/chip-away.scm          |    2 +-
 plug-ins/script-fu/scripts/chrome-it.scm          |   12 +++++-----
 plug-ins/script-fu/scripts/chrome-logo.scm        |   12 +++++-----
 plug-ins/script-fu/scripts/comic-logo.scm         |    4 +-
 plug-ins/script-fu/scripts/crystal-logo.scm       |   12 +++++-----
 plug-ins/script-fu/scripts/difference-clouds.scm  |    2 +-
 plug-ins/script-fu/scripts/distress-selection.scm |    4 +-
 plug-ins/script-fu/scripts/glossy.scm             |    2 +-
 plug-ins/script-fu/scripts/glowing-logo.scm       |    2 +-
 plug-ins/script-fu/scripts/grid-system.scm        |    2 +-
 plug-ins/script-fu/scripts/neon-logo.scm          |    2 +-
 plug-ins/script-fu/scripts/sota-chrome-logo.scm   |   22 +++++++++---------
 plug-ins/script-fu/scripts/spinning-globe.scm     |    2 +-
 plug-ins/script-fu/scripts/t-o-p-logo.scm         |    2 +-
 plug-ins/script-fu/scripts/text-circle.scm        |    6 ++--
 plug-ins/script-fu/scripts/title-header.scm       |    2 +-
 plug-ins/script-fu/scripts/unsharp-mask.scm       |   14 +++++-----
 plug-ins/script-fu/scripts/waves-anim.scm         |    4 +-
 plug-ins/script-fu/scripts/weave.scm              |    2 +-
 28 files changed, 98 insertions(+), 98 deletions(-)
---
diff --git a/plug-ins/script-fu/scripts/3d-outline.scm b/plug-ins/script-fu/scripts/3d-outline.scm
index ccdf49b..db3cf7f 100644
--- a/plug-ins/script-fu/scripts/3d-outline.scm
+++ b/plug-ins/script-fu/scripts/3d-outline.scm
@@ -56,12 +56,12 @@
     (gimp-layer-set-lock-alpha logo-layer FALSE)
     (plug-in-gauss-iir RUN-NONINTERACTIVE img logo-layer outline-blur-radius TRUE TRUE)
 
-    (gimp-drawable-set-visible pattern-layer FALSE)
+    (gimp-item-set-visible pattern-layer FALSE)
     (set! alpha-layer (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
     (plug-in-edge RUN-NONINTERACTIVE img alpha-layer 2 1 0)
-    (gimp-drawable-set-name alpha-layer "Bump map")
+    (gimp-item-set-name alpha-layer "Bump map")
     (set! shadow-layer (car (gimp-layer-copy alpha-layer TRUE)))
-    (gimp-drawable-set-name shadow-layer "Edges")
+    (gimp-item-set-name shadow-layer "Edges")
     (script-fu-util-image-add-layers img shadow-layer)
     (plug-in-gauss-iir RUN-NONINTERACTIVE img alpha-layer bump-map-blur-radius TRUE TRUE)
 
@@ -82,14 +82,14 @@
 
     (gimp-layer-remove-mask pattern-layer MASK-APPLY)
     (gimp-invert shadow-layer)
-    (gimp-drawable-set-name shadow-layer "Drop shadow")
+    (gimp-item-set-name shadow-layer "Drop shadow")
     (plug-in-gauss-iir RUN-NONINTERACTIVE img shadow-layer shadow-blur-radius TRUE TRUE)
 
     (gimp-drawable-offset shadow-layer
                           FALSE OFFSET-BACKGROUND s-offset-x s-offset-y)
 
-    (gimp-drawable-set-visible alpha-layer FALSE)
-    (gimp-drawable-set-visible pattern-layer TRUE)
+    (gimp-item-set-visible alpha-layer FALSE)
+    (gimp-item-set-visible pattern-layer TRUE)
     ;;(set! final (car (gimp-image-flatten img)))
 
     (gimp-context-pop)
diff --git a/plug-ins/script-fu/scripts/add-bevel.scm b/plug-ins/script-fu/scripts/add-bevel.scm
index 68a8353..3bb00cf 100644
--- a/plug-ins/script-fu/scripts/add-bevel.scm
+++ b/plug-ins/script-fu/scripts/add-bevel.scm
@@ -159,7 +159,7 @@
     ; clean up
     (gimp-image-remove-channel image selection)
     (if (= keep-bump-layer TRUE)
-        (gimp-drawable-set-visible bump-layer 0)
+        (gimp-item-set-visible bump-layer 0)
         (gimp-image-remove-layer image bump-layer)
     )
 
diff --git a/plug-ins/script-fu/scripts/addborder.scm b/plug-ins/script-fu/scripts/addborder.scm
index b2db809..632b5d0 100644
--- a/plug-ins/script-fu/scripts/addborder.scm
+++ b/plug-ins/script-fu/scripts/addborder.scm
@@ -97,7 +97,7 @@
       n_array)
   )
 
-  (let* ((img (car (gimp-drawable-get-image adraw)))
+  (let* ((img (car (gimp-item-get-image adraw)))
          (owidth (car (gimp-image-width img)))
          (oheight (car (gimp-image-height img)))
          (width (+ owidth (* 2 xsize)))
diff --git a/plug-ins/script-fu/scripts/alien-neon-logo.scm b/plug-ins/script-fu/scripts/alien-neon-logo.scm
index 356e85d..817eb25 100644
--- a/plug-ins/script-fu/scripts/alien-neon-logo.scm
+++ b/plug-ins/script-fu/scripts/alien-neon-logo.scm
@@ -95,7 +95,7 @@
     ;; (gimp-layer-remove-mask bands-layer MASK-APPLY)
 
     ; Clean up and exit.
-    (gimp-drawable-set-visible logo-layer 0)
+    (gimp-item-set-visible logo-layer 0)
     (gimp-image-set-active-layer img bands-layer)
     (gimp-displays-flush)
 
diff --git a/plug-ins/script-fu/scripts/basic2-logo.scm b/plug-ins/script-fu/scripts/basic2-logo.scm
index 40f314d..b3fa801 100644
--- a/plug-ins/script-fu/scripts/basic2-logo.scm
+++ b/plug-ins/script-fu/scripts/basic2-logo.scm
@@ -58,7 +58,7 @@
 
     (gimp-layer-translate shadow-layer 3 3)
     (gimp-layer-translate highlight-layer (- posx 2) (- posy 2))
-    (gimp-drawable-set-name highlight-layer "Highlight")
+    (gimp-item-set-name highlight-layer "Highlight")
 
     (gimp-context-pop)
   )
diff --git a/plug-ins/script-fu/scripts/blend-anim.scm b/plug-ins/script-fu/scripts/blend-anim.scm
index 90cce6c..51b4849 100644
--- a/plug-ins/script-fu/scripts/blend-anim.scm
+++ b/plug-ins/script-fu/scripts/blend-anim.scm
@@ -79,7 +79,7 @@
 		  (let* ((min-offset-x width)
 				 (min-offset-y height)
 				 (layer-count slots))
-			(gimp-drawable-set-visible bg-layer FALSE)
+			(gimp-item-set-visible bg-layer FALSE)
 			(while (> layer-count -1)
 				   (let* ((layer (aref layer-array layer-count))
 				  (layer-width (+ (car (gimp-drawable-width layer))
@@ -89,7 +89,7 @@
 				  (layer-offsets (gimp-drawable-offsets layer))
 				  (layer-offset-x (- (car layer-offsets) max-blur))
 				  (layer-offset-y (- (cadr layer-offsets) max-blur)))
-				 (gimp-drawable-set-visible layer FALSE)
+				 (gimp-item-set-visible layer FALSE)
 				 (set! max-width (max max-width layer-width))
 				 (set! max-height (max max-height layer-height))
 				 (set! min-offset-x (min min-offset-x layer-offset-x))
@@ -116,9 +116,9 @@
 				  (gimp-image-add-layer image bg-copy 0)
 				  (gimp-image-add-layer image lower-copy 0)
 				  (gimp-image-add-layer image upper-copy 0)
-				  (gimp-drawable-set-visible upper-copy TRUE)
-				  (gimp-drawable-set-visible lower-copy TRUE)
-				  (gimp-drawable-set-visible bg-copy TRUE)
+				  (gimp-item-set-visible upper-copy TRUE)
+				  (gimp-item-set-visible lower-copy TRUE)
+				  (gimp-item-set-visible bg-copy TRUE)
 				  (gimp-layer-set-opacity upper-copy (- 100 opacity))
 				  (gimp-layer-set-opacity lower-copy opacity)
 				  (gimp-layer-set-opacity bg-copy 100)
@@ -161,7 +161,7 @@
 							 offset-y)
 				  (let* ((merged-layer (car (gimp-image-merge-visible-layers
 							   image CLIP-TO-IMAGE))))
-					(gimp-drawable-set-visible merged-layer FALSE))
+					(gimp-item-set-visible merged-layer FALSE))
 				  (set! frame-count (- frame-count 1))))
 				 (set! layer-count (- layer-count 1)))))
 
@@ -177,8 +177,8 @@
 				 (multi-raise-layer image
 						orig-layer
 						(+ (* (- slots layer-count) frames) 1))
-				 (gimp-drawable-set-visible orig-layer TRUE)
-				 (gimp-drawable-set-visible bg-copy TRUE)
+				 (gimp-item-set-visible orig-layer TRUE)
+				 (gimp-item-set-visible bg-copy TRUE)
 				 (gimp-layer-resize bg-copy
 						max-width
 						max-height
@@ -186,13 +186,13 @@
 						offset-y)
 				 (let* ((merged-layer (car (gimp-image-merge-visible-layers
 						  image CLIP-TO-IMAGE))))
-			   (gimp-drawable-set-visible merged-layer FALSE))
+			   (gimp-item-set-visible merged-layer FALSE))
 			   (set! layer-count (+ layer-count 1)))))
 
 		  ; merge the lowest blend layer with the background layer
 		  (let* ((orig-layer (aref layer-array (- num-layers 2))))
-			(gimp-drawable-set-visible bg-layer TRUE)
-			(gimp-drawable-set-visible orig-layer TRUE)
+			(gimp-item-set-visible bg-layer TRUE)
+			(gimp-item-set-visible orig-layer TRUE)
 			(gimp-image-merge-visible-layers image CLIP-TO-IMAGE))
 
 		  ; make all layers visible again
@@ -205,8 +205,8 @@
 				  (name (string-append "Frame "
 						   (number->string
 							(- num-result-layers layer-count) 10))))
-				 (gimp-drawable-set-visible layer TRUE)
-				 (gimp-drawable-set-name layer name)
+				 (gimp-item-set-visible layer TRUE)
+				 (gimp-item-set-name layer name)
 				 (set! layer-count (- layer-count 1))))
 
 			(if (= looped TRUE)
diff --git a/plug-ins/script-fu/scripts/burn-in-anim.scm b/plug-ins/script-fu/scripts/burn-in-anim.scm
index 4c232be..b41e29b 100644
--- a/plug-ins/script-fu/scripts/burn-in-anim.scm
+++ b/plug-ins/script-fu/scripts/burn-in-anim.scm
@@ -65,8 +65,8 @@
           (set! source-layer-width (car (gimp-drawable-width  source-layer)))
 
           ;--- hide layers, cause we want to "merge visible layers" later
-          (gimp-drawable-set-visible source-layer FALSE)
-          (gimp-drawable-set-visible bg-source-layer     FALSE)
+          (gimp-item-set-visible source-layer FALSE)
+          (gimp-item-set-visible bg-source-layer     FALSE)
 
           ;--- process image horizontal with pixel-speed
           (while (< bl-x (+ source-layer-width bl-width))
@@ -75,8 +75,8 @@
                                                  (number->string frame-nr 10) ) )
 
               (gimp-image-add-layer img bl-layer -2)
-              (gimp-drawable-set-name bl-layer bl-layer-name)
-              (gimp-drawable-set-visible bl-layer TRUE)
+              (gimp-item-set-name bl-layer bl-layer-name)
+              (gimp-item-set-visible bl-layer TRUE)
               (gimp-layer-set-lock-alpha bl-layer TRUE)
               (gimp-layer-add-alpha bl-layer)
 
@@ -168,12 +168,12 @@
               (gimp-image-lower-layer img bg-layer)
               (set! bg-layer-name (string-append "bg-"
                                                  (number->string frame-nr 10)))
-              (gimp-drawable-set-name bg-layer bg-layer-name)
-              (gimp-drawable-set-visible bg-layer TRUE)
+              (gimp-item-set-name bg-layer bg-layer-name)
+              (gimp-item-set-visible bg-layer TRUE)
               (set! blended-layer (car (gimp-image-merge-visible-layers img
                                         CLIP-TO-IMAGE)))
               ;(set! blended-layer bl-layer)
-              (gimp-drawable-set-visible blended-layer FALSE)
+              (gimp-item-set-visible blended-layer FALSE)
 
               ;--- end of "while" loop
               (set! frame-nr (+ frame-nr 1))
@@ -196,7 +196,7 @@
               )
           )
 
-          (gimp-drawable-set-visible (aref (cadr (gimp-image-get-layers img)) 0)
+          (gimp-item-set-visible (aref (cadr (gimp-image-get-layers img)) 0)
                                   TRUE)
           (gimp-image-undo-enable img)
           (gimp-image-clean-all img)
diff --git a/plug-ins/script-fu/scripts/carve-it.scm b/plug-ins/script-fu/scripts/carve-it.scm
index a6f3cf3..a441849 100644
--- a/plug-ins/script-fu/scripts/carve-it.scm
+++ b/plug-ins/script-fu/scripts/carve-it.scm
@@ -58,7 +58,7 @@
         (brush-size (carve-scale size 0.3))
         (mask-fs 0)
         (mask (car (gimp-channel-new img width height "Engraving Mask" 50 '(0 0 0))))
-        (inset-gamma (calculate-inset-gamma (car (gimp-drawable-get-image bg-layer)) bg-layer))
+        (inset-gamma (calculate-inset-gamma (car (gimp-item-get-image bg-layer)) bg-layer))
         (mask-fat 0)
         (mask-emboss 0)
         (mask-highlight 0)
@@ -72,7 +72,7 @@
         (bg-width (car (gimp-drawable-width bg-layer)))
         (bg-height (car (gimp-drawable-height bg-layer)))
         (bg-type (car (gimp-drawable-type bg-layer)))
-        (bg-image (car (gimp-drawable-get-image bg-layer)))
+        (bg-image (car (gimp-item-get-image bg-layer)))
         (layer1 (car (gimp-layer-new img bg-width bg-height bg-type "Layer1" 100 NORMAL-MODE)))
         )
 
@@ -164,11 +164,11 @@
     (gimp-image-remove-channel img mask-highlight)
     (gimp-image-remove-channel img mask-shadow)
 
-    (gimp-drawable-set-name layer1 "Carved Surface")
-    (gimp-drawable-set-name shadow-layer "Bevel Shadow")
-    (gimp-drawable-set-name highlight-layer "Bevel Highlight")
-    (gimp-drawable-set-name cast-shadow-layer "Cast Shadow")
-    (gimp-drawable-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)
diff --git a/plug-ins/script-fu/scripts/carved-logo.scm b/plug-ins/script-fu/scripts/carved-logo.scm
index a5624c0..b3db324 100644
--- a/plug-ins/script-fu/scripts/carved-logo.scm
+++ b/plug-ins/script-fu/scripts/carved-logo.scm
@@ -144,11 +144,11 @@
     (gimp-image-remove-channel img mask-highlight)
     (gimp-image-remove-channel img mask-shadow)
 
-    (gimp-drawable-set-name layer1 "Carved Surface")
-    (gimp-drawable-set-name shadow-layer "Bevel Shadow")
-    (gimp-drawable-set-name highlight-layer "Bevel Highlight")
-    (gimp-drawable-set-name cast-shadow-layer "Cast Shadow")
-    (gimp-drawable-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)
diff --git a/plug-ins/script-fu/scripts/chip-away.scm b/plug-ins/script-fu/scripts/chip-away.scm
index 9864bcc..d81569e 100644
--- a/plug-ins/script-fu/scripts/chip-away.scm
+++ b/plug-ins/script-fu/scripts/chip-away.scm
@@ -88,7 +88,7 @@
     (plug-in-bump-map RUN-NONINTERACTIVE img logo-layer bump-layer
                       135.00 25.0 60 0 0 0 0 TRUE invert 1)
 
-    (gimp-drawable-set-visible bump-layer FALSE)
+    (gimp-item-set-visible bump-layer FALSE)
 
      (if (= drop-shadow TRUE)
         (begin
diff --git a/plug-ins/script-fu/scripts/chrome-it.scm b/plug-ins/script-fu/scripts/chrome-it.scm
index ee64667..eca4bf2 100644
--- a/plug-ins/script-fu/scripts/chrome-it.scm
+++ b/plug-ins/script-fu/scripts/chrome-it.scm
@@ -132,8 +132,8 @@
     (gimp-edit-fill layer3 BACKGROUND-FILL)
     (gimp-edit-clear shadow)
 
-    (gimp-drawable-set-visible bg-layer FALSE)
-    (gimp-drawable-set-visible shadow FALSE)
+    (gimp-item-set-visible bg-layer FALSE)
+    (gimp-item-set-visible shadow FALSE)
 
     (gimp-selection-load mask)
     (gimp-context-set-background '(0 0 0))
@@ -194,11 +194,11 @@
                         (highlights (rval cc)) (highlights (gval cc)) (highlights (bval cc)))
     (gimp-hue-saturation layer2 ALL-HUES 0.0 chrome-lightness chrome-saturation)
 
-    (gimp-drawable-set-visible shadow TRUE)
-    (gimp-drawable-set-visible bg-layer TRUE)
+    (gimp-item-set-visible shadow TRUE)
+    (gimp-item-set-visible bg-layer TRUE)
 
-    (gimp-drawable-set-name layer2 "Chrome")
-    (gimp-drawable-set-name layer1 "Highlight")
+    (gimp-item-set-name layer2 "Chrome")
+    (gimp-item-set-name layer1 "Highlight")
 
     (gimp-image-remove-channel img mask)
 
diff --git a/plug-ins/script-fu/scripts/chrome-logo.scm b/plug-ins/script-fu/scripts/chrome-logo.scm
index 4d0b47e..cf2f271 100644
--- a/plug-ins/script-fu/scripts/chrome-logo.scm
+++ b/plug-ins/script-fu/scripts/chrome-logo.scm
@@ -31,9 +31,9 @@
     (gimp-edit-fill layer3 BACKGROUND-FILL)
     (gimp-edit-clear shadow)
     (gimp-selection-layer-alpha logo-layer)
-    (gimp-drawable-set-visible logo-layer FALSE)
-    (gimp-drawable-set-visible shadow FALSE)
-    (gimp-drawable-set-visible background FALSE)
+    (gimp-item-set-visible logo-layer FALSE)
+    (gimp-item-set-visible shadow FALSE)
+    (gimp-item-set-visible background FALSE)
     (gimp-context-set-background '(0 0 0))
     (gimp-edit-fill layer1 BACKGROUND-FILL)
     (gimp-selection-translate img offx1 offy1)
@@ -60,9 +60,9 @@
     (gimp-selection-none img)
     (gimp-context-set-background bg-color)
     (gimp-edit-fill background BACKGROUND-FILL)
-    (gimp-drawable-set-visible shadow TRUE)
-    (gimp-drawable-set-visible background TRUE)
-    (gimp-drawable-set-name layer1 (car (gimp-drawable-get-name logo-layer)))
+    (gimp-item-set-visible shadow TRUE)
+    (gimp-item-set-visible background TRUE)
+    (gimp-item-set-name layer1 (car (gimp-item-get-name logo-layer)))
     (gimp-image-remove-layer img logo-layer)
 
     (gimp-context-pop)
diff --git a/plug-ins/script-fu/scripts/comic-logo.scm b/plug-ins/script-fu/scripts/comic-logo.scm
index dd0f860..f31d693 100644
--- a/plug-ins/script-fu/scripts/comic-logo.scm
+++ b/plug-ins/script-fu/scripts/comic-logo.scm
@@ -41,9 +41,9 @@
     (script-fu-util-image-resize-from-layer img logo-layer)
     (script-fu-util-image-add-layers img black-layer white-layer bg-layer)
     (gimp-layer-translate white-layer posx posy)
-    (gimp-drawable-set-name white-layer "White")
+    (gimp-item-set-name white-layer "White")
     (gimp-layer-translate black-layer posx posy)
-    (gimp-drawable-set-name black-layer "Black")
+    (gimp-item-set-name black-layer "Black")
 
     (gimp-selection-all img)
     (gimp-context-set-background bg-color)
diff --git a/plug-ins/script-fu/scripts/crystal-logo.scm b/plug-ins/script-fu/scripts/crystal-logo.scm
index 9d8c6f2..488c60f 100644
--- a/plug-ins/script-fu/scripts/crystal-logo.scm
+++ b/plug-ins/script-fu/scripts/crystal-logo.scm
@@ -122,7 +122,7 @@
     (gimp-selection-none img)
     (gimp-edit-fill layer2 BACKGROUND-FILL)
     (gimp-edit-fill layer3 BACKGROUND-FILL)
-    (gimp-drawable-set-visible text-layer FALSE)
+    (gimp-item-set-visible text-layer FALSE)
 
     (gimp-selection-layer-alpha text-layer)
     (gimp-context-set-background '(0 0 0))
@@ -190,11 +190,11 @@
 
     (gimp-image-remove-channel img disp-map)
 
-    (gimp-drawable-set-visible text-layer TRUE)
-    (gimp-drawable-set-name layer1 "Crystal")
-    (gimp-drawable-set-name layer2 "Interior")
-    (gimp-drawable-set-name bg-layer "Background")
-    (gimp-drawable-set-name text-layer "Shadow")
+    (gimp-item-set-visible text-layer TRUE)
+    (gimp-item-set-name layer1 "Crystal")
+    (gimp-item-set-name layer2 "Interior")
+    (gimp-item-set-name bg-layer "Background")
+    (gimp-item-set-name text-layer "Shadow")
 
     (gimp-image-undo-enable img)
     (gimp-display-new img)
diff --git a/plug-ins/script-fu/scripts/difference-clouds.scm b/plug-ins/script-fu/scripts/difference-clouds.scm
index 0366827..3247c02 100644
--- a/plug-ins/script-fu/scripts/difference-clouds.scm
+++ b/plug-ins/script-fu/scripts/difference-clouds.scm
@@ -48,7 +48,7 @@
     (set! offset-y (+ draw-offset-y sel-offset-y))
 
     ; Offset the clouds layer
-    (if (gimp-drawable-is-layer drawable)
+    (if (gimp-item-is-layer drawable)
       (gimp-layer-translate diff-clouds offset-x offset-y))
 
     ; Show the solid noise dialog
diff --git a/plug-ins/script-fu/scripts/distress-selection.scm b/plug-ins/script-fu/scripts/distress-selection.scm
index 8f41e14..1a08019 100644
--- a/plug-ins/script-fu/scripts/distress-selection.scm
+++ b/plug-ins/script-fu/scripts/distress-selection.scm
@@ -83,8 +83,8 @@
   (plug-in-gauss-iir RUN-NONINTERACTIVE theImage theLayer 1 TRUE TRUE)
   (gimp-selection-layer-alpha theLayer)
   (gimp-image-remove-layer theImage theLayer)
-  (if (and (= (car (gimp-drawable-is-channel inDrawable)) TRUE)
-           (= (car (gimp-drawable-is-layer-mask inDrawable)) FALSE))
+  (if (and (= (car (gimp-item-is-channel inDrawable)) TRUE)
+           (= (car (gimp-item-is-layer-mask inDrawable)) FALSE))
     (gimp-image-set-active-channel theImage inDrawable)
     )
   (gimp-image-undo-group-end theImage)
diff --git a/plug-ins/script-fu/scripts/glossy.scm b/plug-ins/script-fu/scripts/glossy.scm
index 9c49fcd..1d9c1bc 100644
--- a/plug-ins/script-fu/scripts/glossy.scm
+++ b/plug-ins/script-fu/scripts/glossy.scm
@@ -53,7 +53,7 @@
 
     (script-fu-util-image-resize-from-layer img logo-layer)
     (script-fu-util-image-add-layers img grow-me bg-layer)
-    (gimp-drawable-set-name grow-me "Grow-me")
+    (gimp-item-set-name grow-me "Grow-me")
     (gimp-layer-translate grow-me posx posy)
 
     (gimp-context-set-background bg-color)
diff --git a/plug-ins/script-fu/scripts/glowing-logo.scm b/plug-ins/script-fu/scripts/glowing-logo.scm
index fb12f33..39ebc92 100644
--- a/plug-ins/script-fu/scripts/glowing-logo.scm
+++ b/plug-ins/script-fu/scripts/glowing-logo.scm
@@ -52,7 +52,7 @@
     (gimp-selection-none img)
 
     (gimp-layer-set-mode logo-layer OVERLAY-MODE)
-    (gimp-drawable-set-name glow-layer "Glow Layer")
+    (gimp-item-set-name glow-layer "Glow Layer")
 
     (gimp-context-pop)
   )
diff --git a/plug-ins/script-fu/scripts/grid-system.scm b/plug-ins/script-fu/scripts/grid-system.scm
index 80387f8..4e83793 100644
--- a/plug-ins/script-fu/scripts/grid-system.scm
+++ b/plug-ins/script-fu/scripts/grid-system.scm
@@ -54,7 +54,7 @@
     (set! grid-layer (car (gimp-layer-copy drw TRUE)))
     (gimp-image-add-layer img grid-layer 0)
     (gimp-edit-clear grid-layer)
-    (gimp-drawable-set-name grid-layer "Grid Layer")
+    (gimp-item-set-name grid-layer "Grid Layer")
 
     (while (not (null? (cdr x-divides)))
       (set! stepped-x (+ stepped-x (car x-divides)))
diff --git a/plug-ins/script-fu/scripts/neon-logo.scm b/plug-ins/script-fu/scripts/neon-logo.scm
index 4134497..f70eb19 100644
--- a/plug-ins/script-fu/scripts/neon-logo.scm
+++ b/plug-ins/script-fu/scripts/neon-logo.scm
@@ -218,7 +218,7 @@
           (gimp-edit-fill shadow-layer BACKGROUND-FILL)))
     (gimp-selection-none img)
 
-    (gimp-drawable-set-name tube-layer "Neon Tubes")
+    (gimp-item-set-name tube-layer "Neon Tubes")
     (gimp-image-remove-channel img selection)
 
     (gimp-context-pop)
diff --git a/plug-ins/script-fu/scripts/sota-chrome-logo.scm b/plug-ins/script-fu/scripts/sota-chrome-logo.scm
index ff642d7..bfef905 100644
--- a/plug-ins/script-fu/scripts/sota-chrome-logo.scm
+++ b/plug-ins/script-fu/scripts/sota-chrome-logo.scm
@@ -117,8 +117,8 @@
     (gimp-edit-fill layer2 BACKGROUND-FILL)
     (gimp-edit-fill layer3 BACKGROUND-FILL)
     (gimp-edit-clear shadow)
-    (gimp-drawable-set-visible text-layer FALSE)
-    (gimp-drawable-set-visible shadow FALSE)
+    (gimp-item-set-visible text-layer FALSE)
+    (gimp-item-set-visible shadow FALSE)
 
     (gimp-rect-select img (/ b-size 2) (/ b-size 2) (- width b-size) (- height b-size) CHANNEL-OP-REPLACE 0 0)
     (gimp-rect-select img b-size b-size (- width (* b-size 2)) (- height (* b-size 2)) CHANNEL-OP-SUBTRACT 0 0)
@@ -132,8 +132,8 @@
     (gimp-selection-translate img (* 2 offx2) (* 2 offy2))
     (gimp-edit-fill layer3 BACKGROUND-FILL)
     (gimp-selection-none img)
-    (gimp-drawable-set-visible  layer2 TRUE)
-    (gimp-drawable-set-visible  layer3 TRUE)
+    (gimp-item-set-visible  layer2 TRUE)
+    (gimp-item-set-visible  layer3 TRUE)
     (set! layer2 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
     (gimp-invert layer2)
 
@@ -143,8 +143,8 @@
     (gimp-layer-scale layer1 width height FALSE)
     (plug-in-gauss-iir RUN-NONINTERACTIVE img layer1 10 TRUE TRUE)
     (gimp-layer-set-opacity layer1 50)
-    (gimp-drawable-set-visible layer1 TRUE)
-    (gimp-drawable-set-visible layer2 TRUE)
+    (gimp-item-set-visible layer1 TRUE)
+    (gimp-item-set-visible layer2 TRUE)
     (set! layer1 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
     (gimp-curves-spline layer1 0 18 (spline1))
 
@@ -181,12 +181,12 @@
     (gimp-color-balance layer2 2 TRUE (highlights (rval cc)) (highlights (gval cc)) (highlights (bval cc)))
     (gimp-hue-saturation layer2 0 0 chrome-lightness chrome-saturation)
 
-    (gimp-drawable-set-visible shadow TRUE)
-    (gimp-drawable-set-visible text-layer TRUE)
+    (gimp-item-set-visible shadow TRUE)
+    (gimp-item-set-visible text-layer TRUE)
 
-    (gimp-drawable-set-name text-layer "Background")
-    (gimp-drawable-set-name layer2 "Chrome")
-    (gimp-drawable-set-name layer1 "Highlight")
+    (gimp-item-set-name text-layer "Background")
+    (gimp-item-set-name layer2 "Chrome")
+    (gimp-item-set-name layer1 "Highlight")
 
     (gimp-layer-translate shadow (/ b-size -4) (/ b-size -4))
     (gimp-layer-translate layer2 (/ b-size -4) (/ b-size -4))
diff --git a/plug-ins/script-fu/scripts/spinning-globe.scm b/plug-ins/script-fu/scripts/spinning-globe.scm
index ce73c5f..e0ec78c 100644
--- a/plug-ins/script-fu/scripts/spinning-globe.scm
+++ b/plug-ins/script-fu/scripts/spinning-globe.scm
@@ -44,7 +44,7 @@
     (set! n (+ n 1))
     (set! theFrame (car (gimp-layer-copy theLayer FALSE)))
     (gimp-image-add-layer theImage theFrame 0)
-    (gimp-drawable-set-name theFrame
+    (gimp-item-set-name theFrame
                          (string-append "Anim Frame: "
                                         (number->string (- inFrames n) 10)
                                         " (replace)"))
diff --git a/plug-ins/script-fu/scripts/t-o-p-logo.scm b/plug-ins/script-fu/scripts/t-o-p-logo.scm
index f42ca07..a659295 100644
--- a/plug-ins/script-fu/scripts/t-o-p-logo.scm
+++ b/plug-ins/script-fu/scripts/t-o-p-logo.scm
@@ -68,7 +68,7 @@
     (gimp-context-set-background bg-color)
     (gimp-edit-fill bg-layer BACKGROUND-FILL)
 
-    (gimp-drawable-set-visible logo-layer 0)
+    (gimp-item-set-visible logo-layer 0)
     (gimp-image-set-active-layer img sparkle-layer)
 
     (gimp-context-pop)
diff --git a/plug-ins/script-fu/scripts/text-circle.scm b/plug-ins/script-fu/scripts/text-circle.scm
index 5d2a9cb..54e2368 100644
--- a/plug-ins/script-fu/scripts/text-circle.scm
+++ b/plug-ins/script-fu/scripts/text-circle.scm
@@ -179,12 +179,12 @@
       (set! index (+ index 1))
     )
 
-    (gimp-drawable-set-visible BG-layer 0)
+    (gimp-item-set-visible BG-layer 0)
     (if (not script-fu-text-circle-debug?)
       (begin
         (set! merged-layer
                 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
-        (gimp-drawable-set-name merged-layer
+        (gimp-item-set-name merged-layer
                      (if (< (string-length text) 16)
                          (wrap-string text)
                          "Text Circle"
@@ -192,7 +192,7 @@
         )
       )
     )
-    (gimp-drawable-set-visible BG-layer 1)
+    (gimp-item-set-visible BG-layer 1)
     (gimp-image-undo-enable img)
     (gimp-image-clean-all img)
     (gimp-display-new img)
diff --git a/plug-ins/script-fu/scripts/title-header.scm b/plug-ins/script-fu/scripts/title-header.scm
index df261cd..ee9c7e7 100644
--- a/plug-ins/script-fu/scripts/title-header.scm
+++ b/plug-ins/script-fu/scripts/title-header.scm
@@ -115,7 +115,7 @@
 
     ; Text layer
 
-    (gimp-drawable-set-visible text-layer TRUE)
+    (gimp-item-set-visible text-layer TRUE)
     (gimp-layer-set-lock-alpha text-layer TRUE)
 
     (gimp-edit-blend text-layer CUSTOM-MODE NORMAL-MODE
diff --git a/plug-ins/script-fu/scripts/unsharp-mask.scm b/plug-ins/script-fu/scripts/unsharp-mask.scm
index 5a3e264..f60e3c5 100644
--- a/plug-ins/script-fu/scripts/unsharp-mask.scm
+++ b/plug-ins/script-fu/scripts/unsharp-mask.scm
@@ -32,7 +32,7 @@
     (set! original-layer-for-darker (car (gimp-layer-copy original-layer TRUE)))
     (set! original-layer-for-lighter (car (gimp-layer-copy original-layer TRUE)))
     (set! blured-layer-for-darker (car (gimp-layer-copy original-layer TRUE)))
-    (gimp-drawable-set-visible original-layer FALSE)
+    (gimp-item-set-visible original-layer FALSE)
     (gimp-display-new new-image)
 
     ;; make darker mask
@@ -45,8 +45,8 @@
     (gimp-layer-set-mode original-layer-for-darker SUBTRACT-MODE)
     (set! darker-layer
           (car (gimp-image-merge-visible-layers new-image CLIP-TO-IMAGE)))
-    (gimp-drawable-set-name darker-layer "darker mask")
-    (gimp-drawable-set-visible darker-layer FALSE)
+    (gimp-item-set-name darker-layer "darker mask")
+    (gimp-item-set-visible darker-layer FALSE)
 
     ;; make lighter mask
     (gimp-image-add-layer new-image original-layer-for-lighter -1)
@@ -54,16 +54,16 @@
     (gimp-layer-set-mode blured-layer-for-lighter SUBTRACT-MODE)
     (set! lighter-layer
           (car (gimp-image-merge-visible-layers new-image CLIP-TO-IMAGE)))
-    (gimp-drawable-set-name lighter-layer "lighter mask")
+    (gimp-item-set-name lighter-layer "lighter mask")
 
     ;; combine them
-    (gimp-drawable-set-visible original-layer TRUE)
+    (gimp-item-set-visible original-layer TRUE)
     (gimp-layer-set-mode darker-layer SUBTRACT-MODE)
     (gimp-layer-set-opacity darker-layer mask-opacity)
-    (gimp-drawable-set-visible darker-layer TRUE)
+    (gimp-item-set-visible darker-layer TRUE)
     (gimp-layer-set-mode lighter-layer ADDITION-MODE)
     (gimp-layer-set-opacity lighter-layer mask-opacity)
-    (gimp-drawable-set-visible lighter-layer TRUE)
+    (gimp-item-set-visible lighter-layer TRUE)
 
     (gimp-image-undo-enable new-image)
     (gimp-displays-flush)
diff --git a/plug-ins/script-fu/scripts/waves-anim.scm b/plug-ins/script-fu/scripts/waves-anim.scm
index 7fb33a5..23eb514 100644
--- a/plug-ins/script-fu/scripts/waves-anim.scm
+++ b/plug-ins/script-fu/scripts/waves-anim.scm
@@ -60,7 +60,7 @@
           )
     (gimp-layer-set-lock-alpha waves-layer FALSE)
     (gimp-image-add-layer image waves-layer -1)
-    (gimp-drawable-set-name waves-layer layer-name)
+    (gimp-item-set-name waves-layer layer-name)
 
     (plug-in-waves RUN-NONINTERACTIVE
                    image
@@ -76,7 +76,7 @@
     )
   )
 
-  (gimp-drawable-set-name source-layer "Frame 1")
+  (gimp-item-set-name source-layer "Frame 1")
   (plug-in-waves RUN-NONINTERACTIVE
                  image
                  source-layer
diff --git a/plug-ins/script-fu/scripts/weave.scm b/plug-ins/script-fu/scripts/weave.scm
index 741d1bb..2dec60f 100644
--- a/plug-ins/script-fu/scripts/weave.scm
+++ b/plug-ins/script-fu/scripts/weave.scm
@@ -351,7 +351,7 @@
                          thread-density
                          thread-intensity)
   (let* (
-        (d-img (car (gimp-drawable-get-image drawable)))
+        (d-img (car (gimp-item-get-image drawable)))
         (d-width (car (gimp-drawable-width drawable)))
         (d-height (car (gimp-drawable-height drawable)))
         (d-offsets (gimp-drawable-offsets drawable))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]