[gimp] Porting scripts to new API, marking layer names for translation
- From: Alexandre Prokoudine <aprokoudine src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Porting scripts to new API, marking layer names for translation
- Date: Sun, 10 Oct 2010 14:00:07 +0000 (UTC)
commit 3abf6de94447fd34b56d3d07aa534b8b5059fb6a
Author: Alexandre Prokoudine <alexandre prokoudine gmail com>
Date: Sun Oct 10 17:59:29 2010 +0400
Porting scripts to new API, marking layer names for translation
plug-ins/script-fu/scripts/burn-in-anim.scm | 10 +++++-----
plug-ins/script-fu/scripts/circuit.scm | 10 +++++-----
plug-ins/script-fu/scripts/clothify.scm | 4 ++--
plug-ins/script-fu/scripts/coffee.scm | 4 ++--
4 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/plug-ins/script-fu/scripts/burn-in-anim.scm b/plug-ins/script-fu/scripts/burn-in-anim.scm
index b41e29b..cff13e6 100644
--- a/plug-ins/script-fu/scripts/burn-in-anim.scm
+++ b/plug-ins/script-fu/scripts/burn-in-anim.scm
@@ -74,14 +74,14 @@
(set! bl-layer-name (string-append "fr-nr"
(number->string frame-nr 10) ) )
- (gimp-image-add-layer img bl-layer -2)
+ (gimp-image-insert-layer img bl-layer -1 -2)
(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)
;--- add an alpha mask for blending and select it
- (gimp-selection-layer-alpha bl-layer)
+ (gimp-item-to-selection bl-layer 2)
(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-selection-layer-alpha bl-layer)
+ (gimp-item-to-selection bl-layer 2)
(gimp-selection-sharpen img)
(gimp-selection-grow img corona-width)
(gimp-layer-set-lock-alpha bl-layer FALSE)
@@ -164,8 +164,8 @@
;--- merge with bg layer
(set! bg-layer (car (gimp-layer-copy bg-source-layer FALSE)))
- (gimp-image-add-layer img bg-layer -1)
- (gimp-image-lower-layer img bg-layer)
+ (gimp-image-insert-layer img bg-layer -1 -1)
+ (gimp-image-lower-item img bg-layer)
(set! bg-layer-name (string-append "bg-"
(number->string frame-nr 10)))
(gimp-item-set-name bg-layer bg-layer-name)
diff --git a/plug-ins/script-fu/scripts/circuit.scm b/plug-ins/script-fu/scripts/circuit.scm
index 85ebc56..3b840cb 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-selection-layer-alpha drawable)
+ (gimp-item-to-selection drawable 2)
(set! active-selection (car (gimp-selection-save image)))
(set! from-selection FALSE))
(begin
@@ -77,15 +77,15 @@
select-width
select-height
type
- "effect layer"
+ _"Effect layer"
100
NORMAL-MODE)))
- (gimp-image-add-layer image effect-layer -1)
+ (gimp-image-insert-layer image effect-layer -1 -1)
(gimp-layer-set-offsets effect-layer select-offset-x select-offset-y)
(gimp-selection-none image)
(gimp-edit-clear effect-layer)
- (gimp-selection-load active-selection)
+ (gimp-item-to-selection active-selection 2)
(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-selection-load active-selection)
+ (gimp-item-to-selection active-selection 2)
(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/clothify.scm b/plug-ins/script-fu/scripts/clothify.scm
index 1568cda..cacc30d 100644
--- a/plug-ins/script-fu/scripts/clothify.scm
+++ b/plug-ins/script-fu/scripts/clothify.scm
@@ -19,7 +19,7 @@
(gimp-image-undo-disable img)
- (gimp-image-add-layer img layer-one 0)
+ (gimp-image-insert-layer img layer-one -1 0)
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill layer-one BACKGROUND-FILL)
@@ -28,7 +28,7 @@
(set! layer-two (car (gimp-layer-copy layer-one 0)))
(gimp-layer-set-mode layer-two MULTIPLY-MODE)
- (gimp-image-add-layer img layer-two 0)
+ (gimp-image-insert-layer img layer-two -1 0)
(plug-in-gauss-rle RUN-NONINTERACTIVE img layer-one bx TRUE FALSE)
(plug-in-gauss-rle RUN-NONINTERACTIVE img layer-two by FALSE TRUE)
diff --git a/plug-ins/script-fu/scripts/coffee.scm b/plug-ins/script-fu/scripts/coffee.scm
index fd1a4f3..1f6fba6 100644
--- a/plug-ins/script-fu/scripts/coffee.scm
+++ b/plug-ins/script-fu/scripts/coffee.scm
@@ -32,11 +32,11 @@
(while (> theNumber 0)
(set! theNumber (- theNumber 1))
(set! theStain (car (gimp-layer-new theImage theSize theSize
- RGBA-IMAGE "Stain" 100
+ RGBA-IMAGE _"Stain" 100
(if (= inDark TRUE)
DARKEN-ONLY-MODE NORMAL-MODE))))
- (gimp-image-add-layer theImage theStain 0)
+ (gimp-image-insert-layer theImage theStain -1 0)
(gimp-selection-all theImage)
(gimp-edit-clear theStain)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]