Commit 5f2ca28c authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

plug-ins/script-fu/scripts/add-bevel.scm

2004-11-11  Michael Natterer  <mitch@gimp.org>

	* plug-ins/script-fu/scripts/add-bevel.scm
	* plug-ins/script-fu/scripts/addborder.scm
	* plug-ins/script-fu/scripts/carve-it.scm
	* plug-ins/script-fu/scripts/carved-logo.scm
	* plug-ins/script-fu/scripts/chip-away.scm
	* plug-ins/script-fu/scripts/clothify.scm
	* plug-ins/script-fu/scripts/font-map.scm
	* plug-ins/script-fu/scripts/slide.scm
	* plug-ins/script-fu/scripts/swirltile.scm: don't call gimp-edit-*
	functions on drawables which are not added to an image because
	this will be forbidden soon (because it can trash the image's undo
	stack).
parent b08cf173
2004-11-11 Michael Natterer <mitch@gimp.org>
* plug-ins/script-fu/scripts/add-bevel.scm
* plug-ins/script-fu/scripts/addborder.scm
* plug-ins/script-fu/scripts/carve-it.scm
* plug-ins/script-fu/scripts/carved-logo.scm
* plug-ins/script-fu/scripts/chip-away.scm
* plug-ins/script-fu/scripts/clothify.scm
* plug-ins/script-fu/scripts/font-map.scm
* plug-ins/script-fu/scripts/slide.scm
* plug-ins/script-fu/scripts/swirltile.scm: don't call gimp-edit-*
functions on drawables which are not added to an image because
this will be forbidden soon (because it can trash the image's undo
stack).
2004-11-11 Michael Natterer <mitch@gimp.org>
 
* plug-ins/script-fu/scripts/lava.scm: replaced
......
......@@ -78,17 +78,19 @@
(gimp-context-push)
; If the layer we're bevelling is offset from the image's origin, we
; have to do the same to the bumpmap
(gimp-layer-set-offsets bump-layer (- (car offsets) 1)
(- (cadr offsets) 1))
; disable undo on copy, start group otherwise
(if (= work-on-copy TRUE)
(gimp-image-undo-disable image)
(gimp-image-undo-group-start image)
)
(gimp-image-add-layer image bump-layer 1)
; If the layer we're bevelling is offset from the image's origin, we
; have to do the same to the bumpmap
(gimp-layer-set-offsets bump-layer (- (car offsets) 1)
(- (cadr offsets) 1))
;------------------------------------------------------------
;
; Set the selection to the area we want to bevel.
......@@ -159,10 +161,8 @@
; clean up
(gimp-image-remove-channel image select)
(if (= keep-bump-layer TRUE)
(begin
(gimp-image-add-layer image bump-layer 1)
(gimp-drawable-set-visible bump-layer 0))
(gimp-drawable-delete bump-layer))
(gimp-drawable-set-visible bump-layer 0)
(gimp-image-remove-layer image bump-layer))
(gimp-image-set-active-layer image pic-layer)
......
......@@ -111,7 +111,10 @@
(gimp-context-push)
(gimp-image-undo-group-start img)
(gimp-drawable-fill layer TRANSPARENT-FILL)
(gimp-image-add-layer img layer 0)
(gimp-image-resize img
width
height
......@@ -156,7 +159,6 @@
(gimp-edit-fill layer BACKGROUND-FILL)
(gimp-selection-none img)
(gimp-image-add-layer img layer 0)
(gimp-image-undo-group-end img)
(gimp-displays-flush)
......
......@@ -72,21 +72,19 @@
(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)))
(layer1 (car (gimp-layer-new img bg-width bg-height bg-type "Layer1" 100 NORMAL-MODE)))
(inset-layer (car (gimp-layer-new img bg-width bg-height bg-type "inset1" 100 NORMAL-MODE))))
(layer1 (car (gimp-layer-new img bg-width bg-height bg-type "Layer1" 100 NORMAL-MODE))))
(gimp-context-push)
(gimp-image-undo-disable img)
(gimp-image-add-layer img layer1 0)
(gimp-selection-all img)
(gimp-edit-clear inset-layer)
(gimp-edit-clear layer1)
(gimp-selection-none img)
(gimp-image-add-layer img layer1 0)
(copy-layer-carve-it img layer1 bg-image bg-layer)
(gimp-edit-clear inset-layer)
(gimp-edit-copy mask-drawable)
(gimp-image-add-channel img mask 0)
......@@ -148,8 +146,8 @@
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill csl-mask BACKGROUND-FILL)
(set! inset-layer (car (gimp-layer-copy layer1 TRUE)))
(gimp-image-add-layer img inset-layer 1)
(set! inset-layer (car (gimp-layer-copy layer1 TRUE)))
(gimp-image-add-layer img inset-layer 1)
(set! il-mask (car (gimp-layer-create-mask inset-layer ADD-BLACK-MASK)))
(gimp-layer-add-mask inset-layer il-mask)
......
......@@ -54,6 +54,8 @@
(gimp-image-set-filename img "")
(gimp-image-add-channel img mask 0)
(gimp-layer-set-preserve-trans mask-layer TRUE)
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill mask-layer BACKGROUND-FILL)
......@@ -62,7 +64,6 @@
(plug-in-tile 1 img layer1 width height FALSE)
(gimp-image-add-channel img mask 0)
(gimp-edit-copy mask-layer)
(set! mask-fs (car (gimp-edit-paste mask FALSE)))
(gimp-floating-sel-anchor mask-fs)
......
......@@ -65,6 +65,8 @@
(gimp-edit-bucket-fill bg-layer 2 NORMAL-MODE 100 255 FALSE 1 1)
(gimp-edit-fill bg-layer BACKGROUND-FILL))
(gimp-image-add-layer img bump-layer 1)
(gimp-selection-all img)
(gimp-edit-clear bump-layer)
(gimp-selection-none img)
......@@ -73,8 +75,6 @@
(gimp-edit-bucket-fill logo-layer 2 NORMAL-MODE 100 255 FALSE 1 1)
(gimp-selection-none img)
(gimp-image-add-layer img bump-layer 1)
(gimp-layer-set-preserve-trans bump-layer FALSE)
(plug-in-spread 1 img bump-layer spread-amount spread-amount)
(gimp-selection-layer-alpha bump-layer)
......@@ -89,6 +89,7 @@
(if (= drop-shadow TRUE)
(begin
(let* ((shadow-layer (car (gimp-layer-new img width height RGBA-IMAGE "Shadow layer" 100 NORMAL-MODE))))
(gimp-image-add-layer img shadow-layer 1)
(gimp-selection-all img)
(gimp-edit-clear shadow-layer)
(gimp-selection-none img)
......@@ -97,7 +98,6 @@
(gimp-edit-fill shadow-layer BACKGROUND-FILL)
(gimp-selection-none img)
(plug-in-gauss-rle 1 img shadow-layer 5 TRUE TRUE)
(gimp-image-add-layer img shadow-layer 1)
(gimp-layer-translate shadow-layer 6 6))))
(if (= keep-bump FALSE)
......
......@@ -17,9 +17,11 @@
(gimp-context-push)
(gimp-image-undo-disable img)
(gimp-image-add-layer img layer-one 0)
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill layer-one BACKGROUND-FILL)
(gimp-image-add-layer img layer-one 0)
(plug-in-noisify 1 img layer-one FALSE 0.7 0.7 0.7 0.7)
......
......@@ -75,8 +75,8 @@
(gimp-context-set-background '(255 255 255))
(gimp-context-set-foreground '(0 0 0))))
(gimp-edit-clear drawable)
(gimp-image-add-layer img drawable 0)
(gimp-edit-clear drawable)
(if (= labels TRUE)
(begin
......@@ -84,8 +84,8 @@
(if (= colors 0)
GRAYA-IMAGE RGBA-IMAGE)
"Labels" 100 NORMAL-MODE)))
(gimp-edit-clear drawable)
(gimp-image-add-layer img drawable -1)))
(gimp-edit-clear drawable)
(while font-list
(set! font (car font-list))
......
......@@ -176,6 +176,9 @@
(hole hole-start)
(top-y (* height 0.06))
(bottom-y(* height 0.855)))
(gimp-layer-add-mask film-layer film-mask)
(gimp-selection-none image)
(while (< hole 8)
(gimp-rect-select image
......@@ -202,7 +205,6 @@
(plug-in-gauss-rle 1 image film-mask hole-radius TRUE TRUE)
(gimp-threshold film-mask 127 255)
(gimp-layer-add-mask film-layer film-mask)
(gimp-layer-remove-mask film-layer MASK-APPLY))
; reorder the layers
......
......@@ -18,9 +18,10 @@
(gimp-context-push)
(gimp-image-undo-disable img)
(gimp-image-add-layer img layer-one 0)
(gimp-context-set-background bg-color)
(gimp-edit-fill layer-one BACKGROUND-FILL)
(gimp-image-add-layer img layer-one 0)
(plug-in-noisify 1 img layer-one FALSE noise-level noise-level noise-level 1.0)
(plug-in-whirl-pinch 1 img layer-one whirl-amount 0.0 1.0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment