Don't change global context and protect scripts from global context settings.
This commit is contained in:
@ -82,6 +82,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
; disable undo on copy, start group otherwise
|
||||
(if (= work-on-copy TRUE)
|
||||
|
@ -128,8 +128,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-antialias TRUE)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
;(gimp-image-resize img (+ length height) (+ height height) 0 0)
|
||||
|
@ -20,8 +20,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-antialias TRUE)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
|
@ -45,6 +45,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img bands-layer bg-layer)
|
||||
|
@ -13,6 +13,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
|
@ -31,6 +31,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
|
@ -83,8 +83,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-antialias TRUE)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img background 0 -1)
|
||||
|
@ -27,8 +27,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-antialias TRUE)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img background 0 -1)
|
||||
|
@ -45,6 +45,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-resize img width height 0 0)
|
||||
|
@ -108,6 +108,7 @@
|
||||
blend-gradient-reverse)
|
||||
(begin
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-group-start img)
|
||||
(apply-blended-logo-effect img logo-layer b-size bg-color
|
||||
|
@ -35,6 +35,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img blur-layer bg-layer)
|
||||
|
@ -55,7 +55,7 @@
|
||||
;--- main program structure starts here, begin of "if-1"
|
||||
(begin
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(set! img (car (gimp-image-duplicate org-img)))
|
||||
(gimp-image-undo-disable img)
|
||||
|
@ -31,6 +31,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-insert-layer theImage baseLayer 0 0)
|
||||
|
||||
|
@ -77,6 +77,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
|
||||
|
@ -51,6 +51,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
|
||||
|
@ -53,6 +53,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img bump-layer bg-layer)
|
||||
|
@ -110,6 +110,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img layer1 layer2 layer3 shadow background)
|
||||
|
@ -51,6 +51,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-group-start image)
|
||||
|
||||
|
@ -26,8 +26,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-antialias TRUE)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-group-start theImage)
|
||||
|
||||
|
@ -176,6 +176,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
(gimp-context-set-foreground text-color)
|
||||
(gimp-context-set-background bg-color)
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-context-set-interpolation INTERPOLATION-NONE)
|
||||
(gimp-context-set-transform-resize TRANSFORM-RESIZE-ADJUST)
|
||||
|
@ -112,6 +112,7 @@
|
||||
(disp-map 0)
|
||||
)
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-delete back-img)
|
||||
(gimp-image-undo-disable img)
|
||||
|
@ -37,7 +37,10 @@
|
||||
(theMode (car (gimp-image-base-type inImage)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
(gimp-image-undo-group-start theImage)
|
||||
|
||||
(if (= theMode GRAY)
|
||||
(set! theMode GRAYA-IMAGE)
|
||||
(set! theMode RGBA-IMAGE)
|
||||
@ -90,6 +93,7 @@
|
||||
(gimp-image-undo-group-end theImage)
|
||||
|
||||
(gimp-displays-flush)
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -56,6 +56,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-set-active-layer image drawable)
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(if ( = isnew 1) (script-fu-util-image-resize-from-layer img shadow-layer))
|
||||
|
||||
|
@ -50,6 +50,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img grow-me bg-layer)
|
||||
|
@ -19,6 +19,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img glow-layer bg-layer)
|
||||
|
@ -34,6 +34,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img blur-layer bg-layer)
|
||||
|
@ -32,6 +32,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-undo-disable distortion-img)
|
||||
|
@ -36,6 +36,9 @@
|
||||
RGB-IMAGE "Bottom" 100 NORMAL-MODE)))
|
||||
(layer-two 0)
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
(gimp-context-set-gradient gradient)
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img layer-one 0 0)
|
||||
@ -48,8 +51,6 @@
|
||||
|
||||
(plug-in-gradmap RUN-NONINTERACTIVE img layer-two)
|
||||
|
||||
|
||||
|
||||
(gimp-image-select-color img CHANNEL-OP-REPLACE layer-one '(190 190 190))
|
||||
(plug-in-bump-map RUN-NONINTERACTIVE img layer-two layer-one 135.0 35 landheight 0 0 0 0 TRUE FALSE 0)
|
||||
|
||||
@ -64,6 +65,7 @@
|
||||
|
||||
(gimp-display-new img)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -46,6 +46,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
(gimp-image-undo-group-start image)
|
||||
|
||||
(if (= (car (gimp-drawable-has-alpha drawable)) FALSE)
|
||||
|
@ -25,8 +25,7 @@
|
||||
(dir-deg/line (/ 360 num-of-lines))
|
||||
)
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-antialias TRUE)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(define (draw-vector beg-x beg-y direction)
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img drawable 0 0)
|
||||
|
@ -116,6 +116,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
; ensure that we don't shrink selection so much
|
||||
; that we create an empty selection.
|
||||
|
@ -32,6 +32,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img bg-layer 0 1)
|
||||
|
@ -49,6 +49,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(if (> rel-distance 24) (set! rel-distance 999999))
|
||||
(if (= rel-distance rel-length) (set! rel-distance (+ rel-distance 0.01)))
|
||||
|
@ -45,6 +45,8 @@
|
||||
(active-layer 0)
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
(gimp-image-undo-group-start image)
|
||||
(gimp-layer-add-alpha drawable)
|
||||
|
||||
@ -111,6 +113,7 @@
|
||||
(gimp-image-remove-channel image active-selection)
|
||||
(gimp-image-undo-group-end image)
|
||||
(gimp-displays-flush)
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -114,8 +114,8 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
|
||||
(gimp-context-set-antialias FALSE)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-image-undo-disable img)
|
||||
|
||||
; Create bumpmap layer
|
||||
|
@ -59,8 +59,7 @@
|
||||
(pic-layer (car (gimp-image-get-active-drawable image))))
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-antialias TRUE)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(if (= work-on-copy TRUE)
|
||||
(gimp-image-undo-disable image)
|
||||
|
@ -47,6 +47,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable image)
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable image)
|
||||
|
||||
|
@ -53,8 +53,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-antialias FALSE)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
;; select to the full bounds of the selection,
|
||||
;; fills in irregular shapes or holes.
|
||||
|
@ -106,7 +106,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-resize img width height 0 0)
|
||||
|
@ -35,6 +35,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img bg-layer 0 1)
|
||||
|
@ -72,6 +72,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
|
@ -23,6 +23,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img sparkle-layer shadow-layer bg-layer)
|
||||
|
@ -199,7 +199,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-antialias TRUE)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img drawable 0 0)
|
||||
|
@ -55,6 +55,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
(gimp-context-set-antialias antialias)
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img BG-layer 0 0)
|
||||
|
@ -37,7 +37,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-feather TRUE)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img text-shadow-layer drop-shadow-layer blend-layer shadow-layer)
|
||||
|
@ -31,11 +31,12 @@
|
||||
)
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-image-undo-group-start theImage)
|
||||
|
||||
(gimp-layer-resize theLayer (* 3 theWidth) (* 3 theHeight) 0 0)
|
||||
|
||||
(gimp-context-set-feather 0)
|
||||
(gimp-context-set-feather-radius 0 0)
|
||||
(gimp-image-select-rectangle theImage CHANNEL-OP-REPLACE 0 0 theWidth theHeight)
|
||||
(gimp-edit-cut theLayer)
|
||||
|
||||
@ -59,6 +60,7 @@
|
||||
(gimp-layer-set-offsets theLayer 0 0)
|
||||
(gimp-image-undo-group-end theImage)
|
||||
(gimp-displays-flush)
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -79,8 +79,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-antialias TRUE)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
; Create image
|
||||
|
||||
|
@ -121,6 +121,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-undo-disable tile)
|
||||
|
@ -51,6 +51,7 @@
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-group-start image)
|
||||
(gimp-layer-add-alpha drawable)
|
||||
|
Reference in New Issue
Block a user