[gimp] Porting scripts to new API
- From: Alexandre Prokoudine <aprokoudine src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Porting scripts to new API
- Date: Sat, 9 Oct 2010 22:41:14 +0000 (UTC)
commit 466523f7325fc05f136567ec832100e1bb5507e6
Author: Alexandre Prokoudine <alexandre prokoudine gmail com>
Date: Sun Oct 10 02:37:31 2010 +0400
Porting scripts to new API
plug-ins/script-fu/scripts/distress-selection.scm | 4 ++--
plug-ins/script-fu/scripts/mkbrush.scm | 8 ++++----
plug-ins/script-fu/scripts/select-to-brush.scm | 2 +-
plug-ins/script-fu/scripts/select-to-image.scm | 2 +-
plug-ins/script-fu/scripts/select-to-pattern.scm | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/plug-ins/script-fu/scripts/distress-selection.scm b/plug-ins/script-fu/scripts/distress-selection.scm
index 1a08019..ae80966 100644
--- a/plug-ins/script-fu/scripts/distress-selection.scm
+++ b/plug-ins/script-fu/scripts/distress-selection.scm
@@ -50,7 +50,7 @@
100
NORMAL-MODE)))
- (gimp-image-add-layer theImage theLayer 0)
+ (gimp-image-insert-layer theImage theLayer -1 0)
(if (= FALSE (car (gimp-selection-is-empty theImage)))
(gimp-edit-fill theLayer BACKGROUND-FILL)
@@ -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-selection-layer-alpha theLayer)
+ (gimp-item-to-selection theLayer 2)
(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/mkbrush.scm b/plug-ins/script-fu/scripts/mkbrush.scm
index 0a48495..7545a4d 100644
--- a/plug-ins/script-fu/scripts/mkbrush.scm
+++ b/plug-ins/script-fu/scripts/mkbrush.scm
@@ -38,7 +38,7 @@
(gimp-context-push)
(gimp-image-undo-disable img)
- (gimp-image-add-layer img drawable 0)
+ (gimp-image-insert-layer img drawable -1 0)
(gimp-context-set-background '(255 255 255))
(gimp-drawable-fill drawable BACKGROUND-FILL)
@@ -97,7 +97,7 @@
(gimp-context-push)
(gimp-image-undo-disable img)
- (gimp-image-add-layer img drawable 0)
+ (gimp-image-insert-layer img drawable -1 0)
(gimp-context-set-background '(255 255 255))
(gimp-drawable-fill drawable BACKGROUND-FILL)
@@ -157,7 +157,7 @@
(gimp-context-push)
(gimp-image-undo-disable img)
- (gimp-image-add-layer img drawable 0)
+ (gimp-image-insert-layer img drawable -1 0)
(gimp-context-set-background '(255 255 255))
(gimp-drawable-fill drawable BACKGROUND-FILL)
@@ -216,7 +216,7 @@
(gimp-context-push)
(gimp-image-undo-disable img)
- (gimp-image-add-layer img drawable 0)
+ (gimp-image-insert-layer img drawable -1 0)
(gimp-context-set-background '(255 255 255))
(gimp-drawable-fill drawable BACKGROUND-FILL)
diff --git a/plug-ins/script-fu/scripts/select-to-brush.scm b/plug-ins/script-fu/scripts/select-to-brush.scm
index c6e7e8d..8881441 100644
--- a/plug-ins/script-fu/scripts/select-to-brush.scm
+++ b/plug-ins/script-fu/scripts/select-to-brush.scm
@@ -86,7 +86,7 @@
100
NORMAL-MODE)))
- (gimp-image-add-layer brush-image brush-draw 0)
+ (gimp-image-insert-layer brush-image brush-draw -1 0)
(gimp-selection-none brush-image)
diff --git a/plug-ins/script-fu/scripts/select-to-image.scm b/plug-ins/script-fu/scripts/select-to-image.scm
index 02ebb97..db7c511 100644
--- a/plug-ins/script-fu/scripts/select-to-image.scm
+++ b/plug-ins/script-fu/scripts/select-to-image.scm
@@ -60,7 +60,7 @@
(set! new-draw (car (gimp-layer-new new-image
selection-width selection-height
draw-type "Selection" 100 NORMAL-MODE)))
- (gimp-image-add-layer new-image new-draw 0)
+ (gimp-image-insert-layer new-image new-draw -1 0)
(gimp-drawable-fill new-draw BACKGROUND-FILL)
(let ((floating-sel (car (gimp-edit-paste new-draw FALSE))))
diff --git a/plug-ins/script-fu/scripts/select-to-pattern.scm b/plug-ins/script-fu/scripts/select-to-pattern.scm
index ee50ae3..a5bfc18 100644
--- a/plug-ins/script-fu/scripts/select-to-pattern.scm
+++ b/plug-ins/script-fu/scripts/select-to-pattern.scm
@@ -67,7 +67,7 @@
(gimp-drawable-fill pattern-draw TRANSPARENT-FILL)
- (gimp-image-add-layer pattern-image pattern-draw 0)
+ (gimp-image-insert-layer pattern-image pattern-draw -1 0)
(gimp-edit-copy drawable)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]