Delete obsolete scripts from 2.99

Moved to gimp-data-extras repo

    erase-rows fix #9885
    grid-system fix #8464
    select-to-brush fix #9878
    select-to-image
    select-to-pattern

Just deleted:

    script-fu-copy-visible fix #9868
This commit is contained in:
bootchk 2023-08-20 16:35:09 -04:00 committed by Lloyd Konneker
parent 109f43750c
commit 161644fdbc
8 changed files with 0 additions and 575 deletions

View file

@ -1,49 +0,0 @@
; GIMP - The GNU Image Manipulation Program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
;
; "Copy Visible" -- copy the visible selection so that it can be pasted easily
; Copyright (C) 2004 Raphaël Quinet, Adrian Likins, Sven Neumann
;
; 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 3 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, see <https://www.gnu.org/licenses/>.
;
; 2004-04-14 This script was almost rewritten from scratch
; by Raphaël Quinet <raphael@gimp.org>
; see also http://bugzilla.gnome.org/show_bug.cgi?id=139989
;
; The code is new but the API is the same as in the previous version:
; "Copy Visible" version 0.11 01/24/98
; by Adrian Likins <adrian@gimp.org>
; _heavily_ based on:
; cyn-merge.scm version 0.02 10/10/97
; Copyright (C) 1997 Sven Neumann (neumanns@uni-duesseldorf.de)
;
; Removed all code and made it a backward-compat wrapper around
; (gimp-edit-copy-visible)
; 2004-12-12 Michael Natterer <mitch@gimp.org>
;
(define (script-fu-copy-visible image drawable)
(gimp-edit-copy-visible image)
)
(script-fu-register "script-fu-copy-visible"
"Copy Visible"
"This procedure is deprecated! Use \'gimp-edit-copy-visible\' instead."
""
""
""
"RGB* INDEXED* GRAY*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
)

View file

@ -1,71 +0,0 @@
(define (script-fu-erase-rows img drawable orientation which type)
(script-fu-erase-nth-rows img drawable orientation which type 2)
)
(define (script-fu-erase-nth-rows img drawable orientation offset type nth)
(let* (
(width (car (gimp-drawable-get-width drawable)))
(height (car (gimp-drawable-get-height drawable)))
(position-x (car (gimp-drawable-get-offsets drawable)))
(position-y (cadr (gimp-drawable-get-offsets drawable)))
)
(gimp-context-push)
(gimp-context-set-paint-mode LAYER-MODE-NORMAL)
(gimp-context-set-opacity 100.0)
(gimp-context-set-feather FALSE)
(gimp-image-undo-group-start img)
(letrec ((loop (lambda (i max)
(if (< i max)
(begin
(if (= orientation 0)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE position-x (+ i position-y) width 1)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE (+ i position-x) position-y 1 height))
(if (= type 0)
(gimp-drawable-edit-clear drawable)
(gimp-drawable-edit-fill drawable FILL-BACKGROUND))
(loop (+ i nth) max))))))
(loop offset
(if (= orientation 0)
height
width)
)
)
(gimp-selection-none img)
(gimp-image-undo-group-end img)
(gimp-context-pop)
(gimp-displays-flush)
)
)
(script-fu-register "script-fu-erase-nth-rows"
_"_Erase Every Nth Row..."
_"Erase every nth row or column"
"Federico Mena Quintero, Nikc M. (Altered)"
"Federico Mena Quintero"
"June 1997, February 2020"
"RGB* GRAY* INDEXED*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-OPTION _"Rows/cols" '(_"Rows" _"Columns")
SF-ADJUSTMENT "Offset" '(0 0 1024 1 10 0 SF-SPINNER)
SF-OPTION _"Erase/fill" '(_"Erase" _"Fill with BG")
SF-ADJUSTMENT "Skip by" '(1 1 1024 1 10 0 SF-SPINNER)
)
(script-fu-register "script-fu-erase-rows"
_"_Erase Every Other Row..."
_"Erase every other row or column"
"Federico Mena Quintero"
"Federico Mena Quintero"
"June 1997"
"RGB* GRAY* INDEXED*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-OPTION _"Rows/cols" '(_"Rows" _"Columns")
SF-OPTION _"Even/odd" '(_"Even" _"Odd")
SF-OPTION _"Erase/fill" '(_"Erase" _"Fill with BG")
)
; (script-fu-menu-register "script-fu-erase-rows"
; "<Image>/Filters/Distorts")

View file

@ -1,95 +0,0 @@
;;; grid-system.scm -*-scheme-*-
;;; Time-stamp: <1998/01/20 23:22:02 narazaki@InetQ.or.jp>
;;; This file is a part of:
;;; GIMP (Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis)
;;; Author: Shuji Narazaki (narazaki@InetQ.or.jp)
;;; Version 0.6
;;; Code:
(if (not (symbol-bound? 'script-fu-grid-system-x-divides (current-environment)))
(define script-fu-grid-system-x-divides "'(1 g 1)"))
(if (not (symbol-bound? 'script-fu-grid-system-y-divides (current-environment)))
(define script-fu-grid-system-y-divides "'(1 g 1)"))
(define (script-fu-grid-system img drw x-divides-orig y-divides-orig)
(define (update-segment! s x0 y0 x1 y1)
(aset s 0 x0)
(aset s 1 y0)
(aset s 2 x1)
(aset s 3 y1))
(define (map proc seq)
(if (null? seq)
'()
(cons (proc (car seq))
(map proc (cdr seq)))))
(define (convert-g l)
(cond ((null? l) '())
((eq? (car l) 'g) (cons 1.618 (convert-g (cdr l))))
((eq? (car l) '1/g) (cons 0.618 (convert-g (cdr l))))
('else (cons (car l) (convert-g (cdr l))))))
(define (wrap-list l)
(define (wrap-object obj)
(cond ((number? obj) (string-append (number->string obj) " "))
((eq? obj 'g) "g ")
(eq? obj '1/g) "1/g "))
(string-append "'(" (apply string-append (map wrap-object l)) ")"))
(let* ((drw-width (car (gimp-drawable-get-width drw)))
(drw-height (car (gimp-drawable-get-height drw)))
(drw-offset-x (nth 0 (gimp-drawable-get-offsets drw)))
(drw-offset-y (nth 1 (gimp-drawable-get-offsets drw)))
(grid-layer #f)
(segment (cons-array 4 'double))
(stepped-x 0)
(stepped-y 0)
(temp 0)
(total-step-x 0)
(total-step-y 0)
(x-divides (convert-g x-divides-orig))
(y-divides (convert-g y-divides-orig))
(total-step-x (apply + x-divides))
(total-step-y (apply + y-divides)))
(gimp-image-undo-group-start img)
(set! grid-layer (car (gimp-layer-copy drw TRUE)))
(gimp-image-insert-layer img grid-layer 0 0)
(gimp-drawable-edit-clear grid-layer)
(gimp-item-set-name grid-layer "Grid Layer")
(while (not (null? (cdr x-divides)))
(set! stepped-x (+ stepped-x (car x-divides)))
(set! temp (* drw-width (/ stepped-x total-step-x)))
(set! x-divides (cdr x-divides))
(update-segment! segment
(+ drw-offset-x temp) drw-offset-y
(+ drw-offset-x temp) (+ drw-offset-y drw-height))
(gimp-pencil grid-layer 4 segment))
(while (not (null? (cdr y-divides)))
(set! stepped-y (+ stepped-y (car y-divides)))
(set! temp (* drw-height (/ stepped-y total-step-y)))
(set! y-divides (cdr y-divides))
(update-segment! segment
drw-offset-x (+ drw-offset-y temp)
(+ drw-offset-x drw-width) (+ drw-offset-y temp))
(gimp-pencil grid-layer 4 segment))
(gimp-image-undo-group-end img)
(set! script-fu-grid-system-x-divides (wrap-list x-divides-orig))
(set! script-fu-grid-system-y-divides (wrap-list y-divides-orig))
(gimp-displays-flush)))
(script-fu-register "script-fu-grid-system"
_"_Grid..."
_"Draw a grid as specified by the lists of X and Y locations using the current brush"
"Shuji Narazaki <narazaki@InetQ.or.jp>"
"Shuji Narazaki"
"1997"
"RGB*, INDEXED*, GRAY*"
SF-IMAGE "Image to use" 0
SF-DRAWABLE "Drawable to draw grid" 0
SF-VALUE _"X divisions" script-fu-grid-system-x-divides
SF-VALUE _"Y divisions" script-fu-grid-system-y-divides
)

View file

@ -11,16 +11,13 @@ scripts = [
'circuit.scm',
'clothify.scm',
'coffee.scm',
'copy-visible.scm',
'difference-clouds.scm',
'distress-selection.scm',
'drop-shadow.scm',
'erase-rows.scm',
'font-map.scm',
'fuzzyborder.scm',
'gimp-online.scm',
'gradient-example.scm',
'grid-system.scm',
'guides-from-selection.scm',
'guides-new-percent.scm',
'guides-new.scm',
@ -41,9 +38,6 @@ scripts = [
'script-fu-set-cmap.scm',
'script-fu-util.scm',
'script-fu.init',
'select-to-brush.scm',
'select-to-image.scm',
'select-to-pattern.scm',
'selection-round.scm',
'slide.scm',
'spinning-globe.scm',

View file

@ -1,148 +0,0 @@
; GIMP - The GNU 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..
;
; 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 3 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, see <https://www.gnu.org/licenses/>.
(define (script-fu-selection-to-brush image
drawable
name
filename
spacing)
(let* (
(type (car (gimp-drawable-type-with-alpha drawable)))
(selection-bounds (gimp-selection-bounds image))
(select-offset-x (cadr selection-bounds))
(select-offset-y (caddr selection-bounds))
(selection-width (- (cadr (cddr selection-bounds)) select-offset-x))
(selection-height (- (caddr (cddr selection-bounds)) select-offset-y))
(from-selection 0)
(active-selection 0)
(brush-draw-type 0)
(brush-image-type 0)
(brush-image 0)
(brush-draw 0)
(filename2 0)
)
(gimp-context-push)
(gimp-context-set-defaults)
(gimp-image-undo-disable image)
(if (= (car (gimp-selection-is-empty image)) TRUE)
(begin
(gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
(set! from-selection FALSE)
)
(begin
(set! from-selection TRUE)
(set! active-selection (car (gimp-selection-save image)))
)
)
(gimp-edit-copy 1 (make-vector 1 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
LAYER-MODE-NORMAL)))
(gimp-image-insert-layer brush-image brush-draw 0 0)
(gimp-selection-none brush-image)
(if (= type GRAYA-IMAGE)
(begin
(gimp-context-set-background '(255 255 255))
(gimp-drawable-fill brush-draw FILL-BACKGROUND))
(gimp-drawable-fill brush-draw FILL-TRANSPARENT)
)
(let* (
(pasted (gimp-edit-paste brush-draw FALSE))
(num-pasted (car pasted))
(floating-sel (aref (cadr pasted) (- num-pasted 1)))
)
(gimp-floating-sel-anchor floating-sel)
)
(set! filename2 (string-append gimp-directory
"/brushes/"
filename
(number->string image)
".gbr"))
(file-gbr-save 1 brush-image 1 (make-vector 1 brush-draw) filename2 spacing name)
(if (= from-selection TRUE)
(begin
(gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
(gimp-image-remove-channel image active-selection)
)
)
(gimp-image-undo-enable image)
(gimp-image-set-selected-layers image 1 (make-vector 1 drawable))
(gimp-image-delete brush-image)
(gimp-displays-flush)
(gimp-context-pop)
(gimp-brushes-refresh)
(gimp-context-set-brush name)
)
)
(script-fu-register "script-fu-selection-to-brush"
_"To _Brush..."
_"Convert a selection to a brush"
"Adrian Likins <adrian@gimp.org>"
"Adrian Likins"
"10/07/97"
"RGB* GRAY*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-STRING _"_Brush name" "My Brush"
SF-STRING _"_File name" "mybrush"
SF-ADJUSTMENT _"_Spacing" '(25 0 1000 1 1 1 0)
)

View file

@ -1,93 +0,0 @@
; GIMP - The GNU 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 separate 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 3 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, see <https://www.gnu.org/licenses/>.
(define (script-fu-selection-to-image image drawable)
(let* (
(draw-type (car (gimp-drawable-type-with-alpha drawable)))
(image-type (car (gimp-image-get-base-type image)))
(selection-bounds (gimp-selection-bounds image))
(select-offset-x (cadr selection-bounds))
(select-offset-y (caddr selection-bounds))
(selection-width (- (cadr (cddr selection-bounds)) select-offset-x))
(selection-height (- (caddr (cddr selection-bounds)) select-offset-y))
(active-selection 0)
(from-selection 0)
(new-image 0)
(new-draw 0)
)
(gimp-context-push)
(gimp-context-set-defaults)
(gimp-image-undo-disable image)
(if (= (car (gimp-selection-is-empty image)) TRUE)
(begin
(gimp-image-select-item image CHANNEL-OP-REPLACE 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 1 (vector 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 LAYER-MODE-NORMAL)))
(gimp-image-insert-layer new-image new-draw 0 0)
(gimp-drawable-fill new-draw FILL-BACKGROUND)
(let* (
(pasted (gimp-edit-paste new-draw FALSE))
(num-pasted (car pasted))
(floating-sel (aref (cadr pasted) (- num-pasted 1)))
)
(gimp-floating-sel-anchor floating-sel)
)
(gimp-image-undo-enable image)
(gimp-image-set-selected-layers image 1 (vector drawable))
(gimp-display-new new-image)
(gimp-displays-flush)
(gimp-context-pop)
)
)
(script-fu-register "script-fu-selection-to-image"
_"To _Image"
_"Convert a selection to an image"
"Adrian Likins <adrian@gimp.org>"
"Adrian Likins"
"10/07/97"
"RGB* GRAY*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
)

View file

@ -1,108 +0,0 @@
; GIMP - The GNU Image Manipulation Program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
;
; Based on select-to-brush by
; Copyright (c) 1997 Adrian Likins aklikins@eos.ncsu.edu
; Author Cameron Gregory, http://www.flamingtext.com/
;
; Takes the current selection, saves it as a pattern and makes it the active
; pattern
;
; 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 3 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, see <https://www.gnu.org/licenses/>.
(define (script-fu-selection-to-pattern image drawable desc filename)
(let* (
(selection-width 0)
(selection-height 0)
(selection-bounds 0)
(select-offset-x 0)
(select-offset-y 0)
(pattern-draw-type 0)
(pattern-image-type 0)
(pattern-image 0)
(pattern-draw 0)
(filename2 0)
)
(if (= (car (gimp-selection-is-empty image)) TRUE)
(begin
(set! selection-width (car (gimp-drawable-get-width drawable)))
(set! selection-height (car (gimp-drawable-get-height drawable)))
)
(begin
(set! selection-bounds (gimp-drawable-mask-bounds drawable))
(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))
)
)
(if (= (car (gimp-drawable-has-alpha drawable)) TRUE)
(set! pattern-draw-type RGBA-IMAGE)
(set! pattern-draw-type RGB-IMAGE)
)
(set! pattern-image-type RGB)
(set! pattern-image (car (gimp-image-new selection-width selection-height
pattern-image-type)))
(set! pattern-draw
(car (gimp-layer-new pattern-image selection-width selection-height
pattern-draw-type "Pattern" 100 LAYER-MODE-NORMAL)))
(gimp-drawable-fill pattern-draw FILL-TRANSPARENT)
(gimp-image-insert-layer pattern-image pattern-draw 0 0)
(gimp-edit-copy 1 (vector drawable))
(let* (
(pasted (gimp-edit-paste pattern-draw FALSE))
(num-pasted (car pasted))
(floating-sel (aref (cadr pasted) (- num-pasted 1)))
)
(gimp-floating-sel-anchor floating-sel)
)
(set! filename2 (string-append gimp-directory
"/patterns/"
filename
(number->string image)
".pat"))
(file-pat-save 1 pattern-image 1 (vector pattern-draw) filename2 desc)
(gimp-patterns-refresh)
(gimp-context-set-pattern desc)
(gimp-image-delete pattern-image)
(gimp-displays-flush)
)
)
(script-fu-register "script-fu-selection-to-pattern"
_"To _Pattern..."
_"Convert a selection to a pattern"
"Cameron Gregory <cameron@bloke.com>"
"Cameron Gregory"
"09/02/2003"
"RGB* GRAY*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-STRING _"_Pattern name" "My Pattern"
SF-STRING _"_File name" "mypattern"
)

View file

@ -22,12 +22,10 @@ plug-ins/script-fu/scripts/coffee.scm
plug-ins/script-fu/scripts/difference-clouds.scm
plug-ins/script-fu/scripts/distress-selection.scm
plug-ins/script-fu/scripts/drop-shadow.scm
plug-ins/script-fu/scripts/erase-rows.scm
plug-ins/script-fu/scripts/font-map.scm
plug-ins/script-fu/scripts/fuzzyborder.scm
plug-ins/script-fu/scripts/gimp-online.scm
plug-ins/script-fu/scripts/gradient-example.scm
plug-ins/script-fu/scripts/grid-system.scm
plug-ins/script-fu/scripts/guides-from-selection.scm
plug-ins/script-fu/scripts/guides-new-percent.scm
plug-ins/script-fu/scripts/guides-new.scm
@ -45,9 +43,6 @@ plug-ins/script-fu/scripts/ripply-anim.scm
plug-ins/script-fu/scripts/round-corners.scm
plug-ins/script-fu/scripts/script-fu-set-cmap.scm
plug-ins/script-fu/scripts/selection-round.scm
plug-ins/script-fu/scripts/select-to-brush.scm
plug-ins/script-fu/scripts/select-to-image.scm
plug-ins/script-fu/scripts/select-to-pattern.scm
plug-ins/script-fu/scripts/slide.scm
plug-ins/script-fu/scripts/spinning-globe.scm
plug-ins/script-fu/scripts/test-sphere.scm