Commit 21649c5e authored by Ell's avatar Ell

Issue #3341 - Add Bevel doesn't work for high thickness values

Something during the port to gimp-drawable-edit (commit
233ac80d) broke add-bevel.scm when
the thickness is high enough for the selection to become empty.

Add an explicit check for a selection while constructing the bump-
map layer.
parent 79d92a5d
Pipeline #104025 passed with stages
in 17 minutes and 21 seconds
......@@ -117,7 +117,9 @@
(gimp-context-set-background '(0 0 0))
(gimp-drawable-fill bump-layer FILL-BACKGROUND)
(while (< index thickness)
(while (and (< index thickness)
(= (car (gimp-selection-is-empty image)) FALSE)
)
(set! greyness (/ (* index 255) thickness))
(gimp-context-set-background (list greyness greyness greyness))
;(gimp-selection-feather image 1) ;Stop the slopey jaggies?
......@@ -126,8 +128,12 @@
(set! index (+ index 1))
)
; Now the white interior
(gimp-context-set-background '(255 255 255))
(gimp-drawable-edit-fill bump-layer FILL-BACKGROUND)
(if (= (car (gimp-selection-is-empty image)) FALSE)
(begin
(gimp-context-set-background '(255 255 255))
(gimp-drawable-edit-fill bump-layer FILL-BACKGROUND)
)
)
;------------------------------------------------------------
;
......
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