mirror of https://github.com/GNOME/gimp.git
plug-ins/script-fu/scripts/paste-as-brush.scm Some variables were not
2006-10-28 Kevin Cozens <kcozens@cvs.gnome.org> * 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.
This commit is contained in:
parent
1fb934b9f8
commit
3e691c6999
|
@ -1,3 +1,9 @@
|
|||
2006-10-28 Kevin Cozens <kcozens@cvs.gnome.org>
|
||||
|
||||
* 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 <yosh@gimp.org>
|
||||
|
||||
* plug-ins/pygimp/plug-ins/gimpcons.py: can't use gettext.install
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue