diff --git a/ChangeLog b/ChangeLog index ea6198e7e0..a09b808514 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-10-28 Kevin Cozens + + * plug-ins/script-fu/scripts/paste-as-brush.scm + * plug-ins/script-fu/scripts/paste-as-pattern.scm: Some variables + were not being declared before first use. Spotted by Saul Goode. + 2006-10-28 Manish Singh * plug-ins/pygimp/plug-ins/gimpcons.py: can't use gettext.install diff --git a/plug-ins/script-fu/scripts/paste-as-brush.scm b/plug-ins/script-fu/scripts/paste-as-brush.scm index 220c265aff..c847d7dc1d 100644 --- a/plug-ins/script-fu/scripts/paste-as-brush.scm +++ b/plug-ins/script-fu/scripts/paste-as-brush.scm @@ -25,6 +25,12 @@ (brush-image (car (gimp-edit-paste-as-new))) (brush-draw (car (gimp-image-get-active-drawable brush-image))) (type (car (gimp-drawable-type brush-draw))) + (path (string-append gimp-directory + "/brushes/" + filename + (number->string brush-image) + ".gbr")) + ) (if (= type GRAYA-IMAGE) @@ -36,12 +42,6 @@ ) ) - (set! path (string-append gimp-directory - "/brushes/" - filename - (number->string brush-image) - ".gbr")) - (file-gbr-save RUN-NONINTERACTIVE brush-image brush-draw path path spacing name) diff --git a/plug-ins/script-fu/scripts/paste-as-pattern.scm b/plug-ins/script-fu/scripts/paste-as-pattern.scm index 3e053f55d7..c247446481 100644 --- a/plug-ins/script-fu/scripts/paste-as-pattern.scm +++ b/plug-ins/script-fu/scripts/paste-as-pattern.scm @@ -20,24 +20,25 @@ (define (script-fu-paste-as-pattern name filename) - - (set! pattern-image (car (gimp-edit-paste-as-new))) - (set! pattern-draw (car (gimp-image-get-active-drawable pattern-image))) - - (set! path (string-append gimp-directory + (let* ( + (pattern-image (car (gimp-edit-paste-as-new))) + (pattern-draw (car (gimp-image-get-active-drawable pattern-image))) + (path (string-append gimp-directory "/patterns/" filename (number->string pattern-image) ".pat")) + ) - (file-pat-save RUN-NONINTERACTIVE - pattern-image pattern-draw path path - name) + (file-pat-save RUN-NONINTERACTIVE + pattern-image pattern-draw path path + name) - (gimp-image-delete pattern-image) + (gimp-image-delete pattern-image) - (gimp-patterns-refresh) - (gimp-context-set-pattern name) + (gimp-patterns-refresh) + (gimp-context-set-pattern name) + ) ) (script-fu-register "script-fu-paste-as-pattern"