Copy and paste the code below into a text file. Save it with an ".scm" extension in your GIMP scripts folder (ie.. C:\Program Files\GIMP-2.0\share\gimp\2.0\scripts). Refresh your scripts (Filters > Script-Fu > Refresh Scripts) and you can find it under Colors > Map > Ultimate Gradient Map...
Or you can download the script already saved as a scm.
Enjoy!
Art
- Code: Select all
; GIMP - The GNU Image Manipulation Program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
;
; 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.
;
;
;
;
; Script can be found under Colors > Map > Ultimate Gradient Map...
; Define the Function
(define (fp-script-fu-gradient-map-all
img
drawable
actLayer
gradient
gradInvert
foreground
background
)
(gimp-context-push)
(gimp-image-undo-group-start img)
(gimp-context-set-foreground foreground)
(gimp-context-set-background background)
(gimp-context-set-gradient gradient)
(if (= actLayer FALSE)
(begin
(if (= gradInvert TRUE)
(map (lambda (x) (gimp-invert x)) (vector->list (cadr (gimp-image-get-layers img))))
)
(map (lambda (x) (plug-in-gradmap RUN-NONINTERACTIVE img x)) (vector->list (cadr
(gimp-image-get-layers img))))
)
(begin
(if (= gradInvert TRUE)
(gimp-invert drawable)
)
(plug-in-gradmap RUN-NONINTERACTIVE img drawable)
)
)
(gimp-image-undo-group-end img)
(gimp-context-pop)
(gimp-displays-flush)
)
(script-fu-register "fp-script-fu-gradient-map-all"
"<Image>/Colors/Map/Ultimate Gradient Map..."
"Recolor all the layers or the active layer using the chosen gradient or a reversed version."
"Art Wade"
"Art Wade"
"February 16, 2010"
"RGB* GRAY*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-TOGGLE "Work on Active Layer Only?" FALSE
SF-GRADIENT "Gradient" "Incandescent"
SF-TOGGLE "Invert Gradient?" FALSE
SF-COLOR "Foreground Color (Only used if one of the gradient choices uses FG-BG method)" '(0 0
0)
SF-COLOR "Background Color (Only used if one of the gradient choices uses FG-BG method)"
'(255 255 255)
)

I'm going to use it in a tutorial too.





I have minions
@Cyril, don't you think he can tell us himself>? btw. in case you haven't noticed, this forum was made to answer questions, even to members that are active! this is not just for CnC and Showoff!!!!