From 3441b94de7d2c4eb289a80e1f3dc42959f4008cb Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Mon, 10 Feb 2003 16:58:24 +0000 Subject: [PATCH] plug-ins/script-fu/scripts/distress_selection.scm 2003-02-10 Michael Natterer * plug-ins/script-fu/scripts/distress_selection.scm * plug-ins/script-fu/scripts/old_photo.scm * plug-ins/script-fu/scripts/select_to_brush.scm * plug-ins/script-fu/scripts/select_to_image.scm * plug-ins/script-fu/scripts/spinning_globe.scm: removed. * plug-ins/script-fu/scripts/distress-selection.scm * plug-ins/script-fu/scripts/old-photo.scm * plug-ins/script-fu/scripts/select-to-brush.scm * plug-ins/script-fu/scripts/select-to-image.scm * plug-ins/script-fu/scripts/spinning-globe.scm: new filenames with '-' instead of '_'. * plug-ins/script-fu/scripts/Makefile.am: changed accordingly. --- ChangeLog | 17 +++ plug-ins/script-fu/scripts/Makefile.am | 10 +- .../script-fu/scripts/distress_selection.scm | 105 ---------------- plug-ins/script-fu/scripts/old_photo.scm | 95 -------------- .../script-fu/scripts/select_to_brush.scm | 114 ----------------- .../script-fu/scripts/select_to_image.scm | 74 ----------- plug-ins/script-fu/scripts/spinning_globe.scm | 118 ------------------ 7 files changed, 22 insertions(+), 511 deletions(-) delete mode 100644 plug-ins/script-fu/scripts/distress_selection.scm delete mode 100644 plug-ins/script-fu/scripts/old_photo.scm delete mode 100644 plug-ins/script-fu/scripts/select_to_brush.scm delete mode 100644 plug-ins/script-fu/scripts/select_to_image.scm delete mode 100644 plug-ins/script-fu/scripts/spinning_globe.scm diff --git a/ChangeLog b/ChangeLog index d6b5bf2e40..af83d3398f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2003-02-10 Michael Natterer + + * plug-ins/script-fu/scripts/distress_selection.scm + * plug-ins/script-fu/scripts/old_photo.scm + * plug-ins/script-fu/scripts/select_to_brush.scm + * plug-ins/script-fu/scripts/select_to_image.scm + * plug-ins/script-fu/scripts/spinning_globe.scm: removed. + + * plug-ins/script-fu/scripts/distress-selection.scm + * plug-ins/script-fu/scripts/old-photo.scm + * plug-ins/script-fu/scripts/select-to-brush.scm + * plug-ins/script-fu/scripts/select-to-image.scm + * plug-ins/script-fu/scripts/spinning-globe.scm: new filenames + with '-' instead of '_'. + + * plug-ins/script-fu/scripts/Makefile.am: changed accordingly. + 2003-02-10 Michael Natterer * plug-ins/script-fu/scripts/Makefile.am diff --git a/plug-ins/script-fu/scripts/Makefile.am b/plug-ins/script-fu/scripts/Makefile.am index 3d3aadb6fc..e133cff3ff 100644 --- a/plug-ins/script-fu/scripts/Makefile.am +++ b/plug-ins/script-fu/scripts/Makefile.am @@ -41,7 +41,7 @@ scriptdata_DATA = \ coolmetal-logo.scm \ copy-visible.scm \ crystal-logo.scm \ - distress_selection.scm \ + distress-selection.scm \ drop-shadow.scm \ erase-rows.scm \ fade-outline.scm \ @@ -62,7 +62,7 @@ scriptdata_DATA = \ land.scm \ lava.scm \ line-nova.scm \ - old_photo.scm \ + old-photo.scm \ mkbrush.scm \ neon-logo.scm \ news-text.scm \ @@ -72,15 +72,15 @@ scriptdata_DATA = \ rendermap.scm \ ripply-anim.scm \ round-corners.scm \ - select_to_brush.scm \ - select_to_image.scm \ + select-to-brush.scm \ + select-to-image.scm \ select-to-pattern.scm \ selection-round.scm \ slide.scm \ sota-chrome-logo.scm \ speed-text.scm \ sphere.scm \ - spinning_globe.scm \ + spinning-globe.scm \ starburst-logo.scm \ starscape-logo.scm \ swirltile.scm \ diff --git a/plug-ins/script-fu/scripts/distress_selection.scm b/plug-ins/script-fu/scripts/distress_selection.scm deleted file mode 100644 index de370879e7..0000000000 --- a/plug-ins/script-fu/scripts/distress_selection.scm +++ /dev/null @@ -1,105 +0,0 @@ -; -; distress selection -; -; -; Chris Gutteridge (cjg@ecs.soton.ac.uk) -; At ECS Dept, University of Southampton, England. - -; This program is free software; you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation; either version 2 of the License, or -; (at your option) any later version. -; -; This program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with this program; if not, write to the Free Software -; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -; Define the function: - -(define (script-fu-distress-selection inImage - inLayer - inThreshold - inSpread - inGranu - inSmooth - inSmoothH - inSmoothV - ) - - (set! theImage inImage) - (set! theWidth (car (gimp-image-width inImage))) - (set! theHeight (car (gimp-image-height inImage))) - - (gimp-image-undo-disable theImage) - - (set! theLayer (car (gimp-layer-new theImage - theWidth - theHeight - RGBA_IMAGE - "Distress Scratch Layer" - 100 - NORMAL - ) ) ) - - (gimp-image-add-layer theImage theLayer 0) - (if (= TRUE (car (gimp-selection-is-empty theImage))) - () - (gimp-edit-fill theLayer BG-IMAGE-FILL) - ) - (gimp-selection-invert theImage) - (if (= TRUE (car (gimp-selection-is-empty theImage))) - () - (gimp-edit-clear theLayer) - ) - (gimp-selection-invert theImage) - (gimp-selection-none inImage) - - (gimp-layer-scale theLayer - (/ theWidth inGranu) - (/ theHeight inGranu) - TRUE - ) - - (plug-in-spread TRUE - theImage - theLayer - inSpread - inSpread - ) - (plug-in-gauss-iir TRUE theImage theLayer inSmooth inSmoothH inSmoothV) -; (plug-in-gauss-iir TRUE theImage theLayer 2 TRUE TRUE) - (gimp-layer-scale theLayer theWidth theHeight TRUE) - (plug-in-threshold-alpha TRUE theImage theLayer inThreshold) - (plug-in-gauss-iir TRUE theImage theLayer 1 TRUE TRUE) - (gimp-selection-layer-alpha theLayer) - (gimp-image-remove-layer theImage theLayer) -; (gimp-layer-delete theLayer) - (gimp-image-undo-enable theImage) - (gimp-displays-flush) -) - - -; Register the function with the GIMP: - -(script-fu-register - "script-fu-distress-selection" - _"/Script-Fu/Selection/Distress Selection..." - "No description" - "Chris Gutteridge" - "1998, Chris Gutteridge / ECS dept, University of Southampton, England." - "23rd April 1998" - "RGB*" - SF-IMAGE "The Image" 0 - SF-DRAWABLE "The Layer" 0 - SF-ADJUSTMENT _"Threshold (Bigger 1<-->255 Smaller)" '(127 1 255 1 10 0 0) - SF-ADJUSTMENT _"Spread" '(8 0 1000 1 10 0 1) - SF-ADJUSTMENT _"Granularity (1 is Low)" '(4 1 25 1 10 0 1) - SF-ADJUSTMENT _"Smooth" '(2 0 150 1 10 0 1) - SF-TOGGLE _"Smooth Horizontally" TRUE - SF-TOGGLE _"Smooth Vertically" TRUE -) diff --git a/plug-ins/script-fu/scripts/old_photo.scm b/plug-ins/script-fu/scripts/old_photo.scm deleted file mode 100644 index 50147d7f6a..0000000000 --- a/plug-ins/script-fu/scripts/old_photo.scm +++ /dev/null @@ -1,95 +0,0 @@ -; -; old-photo -; -; -; Chris Gutteridge (cjg@ecs.soton.ac.uk) -; At ECS Dept, University of Southampton, England. - -; This program is free software; you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation; either version 2 of the License, or -; (at your option) any later version. -; -; This program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with this program; if not, write to the Free Software -; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -; Define the function: - -(define (script-fu-old-photo inImage inLayer inDefocus inBorder inSepia inMottle inCopy) - (gimp-selection-all inImage) - (set! theImage (if (= inCopy TRUE) - (car (gimp-image-duplicate inImage)) - inImage) - ) - - (set! theLayer (car(gimp-image-flatten theImage))) - (if (= inDefocus TRUE) - (plug-in-gauss-rle TRUE theImage theLayer 1.5 TRUE TRUE) - () - ) - (if (= inBorder TRUE) - (script-fu-fuzzy-border theImage inLayer '(255 255 255) - 20 TRUE 8 FALSE 100 FALSE TRUE ) - () - ) - (set! theLayer (car(gimp-image-flatten theImage))) - - (if (= inSepia TRUE) - (begin (gimp-desaturate theLayer) - (gimp-brightness-contrast theLayer -20 -40) - (gimp-color-balance theLayer 0 TRUE 30 0 -30) - ) - () - ) - (set! theWidth (car (gimp-image-width theImage))) - (set! theHeight (car (gimp-image-height theImage))) - (if (= inMottle TRUE) - (begin (set! mLayer (car (gimp-layer-new theImage theWidth theHeight RGBA_IMAGE "Mottle" 100 DARKEN-ONLY))) - - (gimp-image-add-layer theImage mLayer 0) - (gimp-selection-all theImage) - (gimp-edit-clear mLayer) - (gimp-selection-none theImage) - (plug-in-noisify TRUE theImage mLayer TRUE 0 0 0 0.5) - (plug-in-gauss-rle TRUE theImage mLayer 5 TRUE TRUE) - (set! theLayer (car(gimp-image-flatten theImage))) - ) - () - ) - - - - (if (= inCopy TRUE) - (begin (gimp-image-clean-all theImage) - (gimp-display-new theImage) - ) - () - ) - (gimp-selection-none inImage) - (gimp-displays-flush theImage) -) - -; Register the function with the GIMP: - -(script-fu-register - "script-fu-old-photo" - _"/Script-Fu/Decor/Old Photo..." - "Makes the image look like an old photo" - "Chris Gutteridge" - "1998, Chris Gutteridge / ECS dept, University of Southampton, England." - "16th April 1998" - "RGB* GRAY*" - SF-IMAGE "The Image" 0 - SF-DRAWABLE "The Layer" 0 - SF-TOGGLE _"Defocus" TRUE - SF-TOGGLE _"Border" TRUE - SF-TOGGLE _"Sepia" TRUE - SF-TOGGLE _"Mottle" FALSE - SF-TOGGLE _"Work on Copy" TRUE -) diff --git a/plug-ins/script-fu/scripts/select_to_brush.scm b/plug-ins/script-fu/scripts/select_to_brush.scm deleted file mode 100644 index f9e2a36517..0000000000 --- a/plug-ins/script-fu/scripts/select_to_brush.scm +++ /dev/null @@ -1,114 +0,0 @@ -; The GIMP -- an image manipulation program -; Copyright (C) 1995 Spencer Kimball and Peter Mattis -; -; Selection-to-brush -; Copyright (c) 1997 Adrian Likins -; aklikins@eos.ncsu.edu -; -; Takes the current selection, saves it as a brush, and makes it the active brush.. -; -; NOTE: You need to change the home dir to the approriate place. -; Also, in .13 there are bugs in the gbr plugin that might make it sigsegv -; -; Parts of this script from Sven Neuman's Drop-Shadow and -; Seth Burgess's mkbrush scripts. -; -; This program is free software; you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation; either version 2 of the License, or -; (at your option) any later version. -; -; This program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with this program; if not, write to the Free Software -; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - -(define (script-fu-selection-to-brush image drawable desc filename spacing) - (let* ( - (type (car (gimp-drawable-type-with-alpha drawable))) - (old-bg (car (gimp-palette-get-background)))) - - (set! selection-bounds (gimp-selection-bounds image)) - (set! select-offset-x (cadr selection-bounds)) - (set! select-offset-y (caddr selection-bounds)) - (set! selection-width (- (cadr (cddr selection-bounds)) select-offset-x)) - (set! selection-height (- (caddr (cddr selection-bounds)) select-offset-y)) - - (gimp-image-undo-disable image) - - (if (= (car (gimp-selection-is-empty image)) TRUE) - (begin - (gimp-selection-layer-alpha drawable) - (set! active-selection (car (gimp-selection-save image))) - (set! from-selection FALSE)) - (begin - (set! from-selection TRUE) - (set! active-selection (car (gimp-selection-save image))))) - - (gimp-edit-copy drawable) - - (set! brush_draw_type - (if (= type GRAYA_IMAGE) - GRAY_IMAGE - RGBA_IMAGE)) - - (set! brush_image_type - (if (= type GRAYA_IMAGE) - GRAY - RGB)) - - (set! brush-image (car (gimp-image-new selection-width selection-height brush_image_type))) - - (set! brush-draw - (car (gimp-layer-new brush-image - selection-width - selection-height brush_draw_type "Brush" 100 NORMAL))) - - (gimp-image-add-layer brush-image brush-draw 0) - - (gimp-selection-none brush-image) - - (if (= type GRAYA_IMAGE) - (begin - (gimp-palette-set-background '(255 255 255)) - (gimp-drawable-fill brush-draw BG-IMAGE-FILL))) - - (let ((floating-sel (car (gimp-edit-paste brush-draw FALSE)))) - (gimp-floating-sel-anchor floating-sel)) - - - (set! data-dir (car (gimp-gimprc-query "gimp_dir"))) - (set! filename2 (string-append data-dir - "/brushes/" - filename - (number->string image) - ".gbr")) - - (file-gbr-save 1 brush-image brush-draw filename2 "" spacing desc) - (gimp-brushes-refresh) - (gimp-brushes-set-brush desc) - - (gimp-palette-set-background old-bg) - - (gimp-image-undo-enable image) - (gimp-image-set-active-layer image drawable) - (gimp-image-delete brush-image) - (gimp-displays-flush))) - -(script-fu-register "script-fu-selection-to-brush" - _"/Script-Fu/Selection/To Brush..." - "Convert a selection to a greyscale brush" - "Adrian Likins " - "Adrian Likins" - "10/07/97" - "RGB* GRAY*" - SF-IMAGE "Image" 0 - SF-DRAWABLE "Drawable" 0 - SF-STRING _"Brush Name" "My Brush" - SF-STRING _"Filename" "mybrush" - SF-ADJUSTMENT _"Spacing" '(25 0 1000 1 1 1 0)) diff --git a/plug-ins/script-fu/scripts/select_to_image.scm b/plug-ins/script-fu/scripts/select_to_image.scm deleted file mode 100644 index c4e36cdb4f..0000000000 --- a/plug-ins/script-fu/scripts/select_to_image.scm +++ /dev/null @@ -1,74 +0,0 @@ -; The GIMP -- an image manipulation program -; Copyright (C) 1995 Spencer Kimball and Peter Mattis -; -; Selection to Image -; Copyright (c) 1997 Adrian Likins -; aklikins@eos.ncsu.edu -; -; Takes the Current selection and saves it as a seperate image. -; -; -; This program is free software; you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation; either version 2 of the License, or -; (at your option) any later version. -; -; This program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with this program; if not, write to the Free Software -; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - -(define (script-fu-selection-to-image image drawable) - (let* ( - (draw-type (car (gimp-drawable-type-with-alpha drawable))) - (image-type (car (gimp-image-base-type image))) - (old-bg (car (gimp-palette-get-background)))) - - (set! selection-bounds (gimp-selection-bounds image)) - (set! select-offset-x (cadr selection-bounds)) - (set! select-offset-y (caddr selection-bounds)) - (set! selection-width (- (cadr (cddr selection-bounds)) select-offset-x)) - (set! selection-height (- (caddr (cddr selection-bounds)) select-offset-y)) - - (gimp-image-undo-disable image) - - (if (= (car (gimp-selection-is-empty image)) TRUE) - (begin - (gimp-selection-layer-alpha drawable) - (set! active-selection (car (gimp-selection-save image))) - (set! from-selection FALSE)) - (begin - (set! from-selection TRUE) - (set! active-selection (car (gimp-selection-save image))))) - - (gimp-edit-copy drawable) - - (set! new-image (car (gimp-image-new selection-width selection-height image-type))) - (set! new-draw (car (gimp-layer-new new-image selection-width selection-height draw-type "Selection" 100 NORMAL))) - (gimp-image-add-layer new-image new-draw 0) - (gimp-drawable-fill new-draw BG-IMAGE-FILL) - - (let ((floating-sel (car (gimp-edit-paste new-draw FALSE)))) - (gimp-floating-sel-anchor floating-sel) - ) - - (gimp-palette-set-background old-bg) - (gimp-image-undo-enable image) - (gimp-image-set-active-layer image drawable) - (gimp-display-new new-image) - (gimp-displays-flush))) - -(script-fu-register "script-fu-selection-to-image" - _"/Script-Fu/Selection/To Image" - "Convert a selection to an image" - "Adrian Likins " - "Adrian Likins" - "10/07/97" - "RGB* GRAY*" - SF-IMAGE "Image" 0 - SF-DRAWABLE "Drawable" 0) diff --git a/plug-ins/script-fu/scripts/spinning_globe.scm b/plug-ins/script-fu/scripts/spinning_globe.scm deleted file mode 100644 index e81437aded..0000000000 --- a/plug-ins/script-fu/scripts/spinning_globe.scm +++ /dev/null @@ -1,118 +0,0 @@ -; -; anim_sphere -; -; -; Chris Gutteridge (cjg@ecs.soton.ac.uk) -; At ECS Dept, University of Southampton, England. -; This program is free software; you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation; either version 2 of the License, or -; (at your option) any later version. -; -; This program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with this program; if not, write to the Free Software -; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - -; Define the function: - -(define (script-fu-spinning-globe inImage - inLayer - inFrames - inFromLeft - inTransparent - inIndex - inCopy) - (set! theImage (if (= inCopy TRUE) - (car (gimp-image-duplicate inImage)) - inImage)) - (set! theLayer (car (gimp-image-get-active-layer theImage))) - (gimp-layer-add-alpha theLayer) - - (set! n 0) - (set! ang (* (/ 360 inFrames) - (if (= inFromLeft TRUE) 1 -1) )) - (while (> inFrames n) - (set! n (+ n 1)) - (set! theFrame (car (gimp-layer-copy theLayer FALSE))) - (gimp-image-add-layer theImage theFrame 0) - (gimp-layer-set-name theFrame - (string-append "Anim Frame: " - (number->string (- inFrames n) 10) - " (replace)")) - (plug-in-map-object RUN-NONINTERACTIVE - theImage theFrame - ; mapping - 1 - ; viewpoint - 0.5 0.5 2.0 - ; object pos - 0.5 0.5 0.0 - ; first axis - 1.0 0.0 0.0 - ; 2nd axis - 0.0 1.0 0.0 - ; axis rotation - 0.0 (* n ang) 0.0 - ; light (type, color) - 0 '(255 255 255) - ; light position - -0.5 -0.5 2.0 - ; light direction - -1.0 -1.0 1.0 - ; material (amb, diff, refl, spec, high) - 0.3 1.0 0.5 0.0 27.0 - ; antialias - TRUE - ; tile - FALSE - ; new image - FALSE - ; transparency - inTransparent - ; radius - 0.25 - ; unused parameters - 1.0 1.0 1.0 1.0 - 0 0 0 0 0 0 0 0) - ; end while: - ) - (gimp-image-remove-layer theImage theLayer) - (plug-in-autocrop RUN-NONINTERACTIVE theImage theFrame) - - (if (= inIndex 0) - () - (gimp-convert-indexed theImage FS-DITHER MAKE-PALETTE inIndex FALSE FALSE "")) - - (if (= inCopy TRUE) - (begin - (gimp-image-clean-all theImage) - (gimp-display-new theImage)) - ()) - - (gimp-displays-flush) -) - -; Register the function with the GIMP: - -(script-fu-register - "script-fu-spinning-globe" - _"/Script-Fu/Animators/Spinning Globe..." - "Maps the image on an animated spinning globe" - "Chris Gutteridge" - "1998, Chris Gutteridge / ECS dept, University of Southampton, England." - "16th April 1998" - "RGB* GRAY*" - SF-IMAGE "The Image" 0 - SF-DRAWABLE "The Layer" 0 - SF-ADJUSTMENT _"Frames" '(10 1 360 1 10 0 1) - SF-TOGGLE _"Turn from Left to Right" FALSE - SF-TOGGLE _"Transparent Background" TRUE - SF-ADJUSTMENT _"Index to n Colors (0 = Remain RGB)" '(63 0 256 1 10 0 1) - SF-TOGGLE _"Work on Copy" TRUE -)