gimp/plug-ins/script-fu/scripts/chrome-it.scm

203 lines
7.4 KiB
Scheme
Raw Normal View History

1997-11-24 22:05:25 +00:00
; CHROME-IT
; State of the art chrome effect for user-specified mask
; This script requires a grayscale image containing a single layer.
; This layer is used as the mask for the SOTA chrome effect
(define (set-pt a index x y)
(prog1
(aset a (* index 2) x)
(aset a (+ (* index 2) 1) y)))
(define (spline-chrome-it)
(let* ((a (cons-array 18 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 31 235)
(set-pt a 2 63 23)
(set-pt a 3 95 230)
(set-pt a 4 127 25)
(set-pt a 5 159 210)
(set-pt a 6 191 20)
(set-pt a 7 223 240)
(set-pt a 8 255 31)
a))
(define (brush brush-size)
(cond ((<= brush-size 5) "Circle Fuzzy (05)")
((<= brush-size 7) "Circle Fuzzy (07)")
((<= brush-size 9) "Circle Fuzzy (09)")
((<= brush-size 11) "Circle Fuzzy (11)")
((<= brush-size 13) "Circle Fuzzy (13)")
((<= brush-size 15) "Circle Fuzzy (15)")
((<= brush-size 17) "Circle Fuzzy (17)")
(else "Circle Fuzzy (19)")))
(define (shadows val)
(/ (* 0.96 val) 2.55))
(define (midtones val)
(/ val 2.55))
(define (highlights val)
(/ (* 1.108 val) 2.55))
(define (rval col)
(car col))
(define (gval col)
(cadr col))
(define (bval col)
(caddr col))
(define (sota-scale val scale chrome-factor)
(* (sqrt val) (* scale chrome-factor)))
(define (copy-layer-chrome-it dest-image dest-drawable source-image source-drawable)
(gimp-selection-all dest-image)
(gimp-edit-clear dest-drawable)
1997-11-24 22:05:25 +00:00
(gimp-selection-none dest-image)
(gimp-selection-all source-image)
(gimp-edit-copy source-drawable)
(let ((floating-sel (car (gimp-edit-paste dest-drawable FALSE))))
1997-11-24 22:05:25 +00:00
(gimp-floating-sel-anchor floating-sel)))
(define (script-fu-sota-chrome-it mask-img mask-drawable chrome-saturation
chrome-lightness chrome-factor env-map hc cc carve-white)
(let* ((banding-img (car (gimp-file-load 1 env-map env-map)))
(banding-layer (car (gimp-image-get-active-drawable banding-img)))
1997-11-24 22:05:25 +00:00
(banding-height (car (gimp-drawable-height banding-layer)))
(banding-width (car (gimp-drawable-width banding-layer)))
(banding-type (car (gimp-drawable-type banding-layer)))
(width (car (gimp-drawable-width mask-drawable)))
(height (car (gimp-drawable-height mask-drawable)))
(img (car (gimp-image-new width height GRAY)))
(size (min width height))
(offx1 (sota-scale size 0.33 chrome-factor))
(offy1 (sota-scale size 0.25 chrome-factor))
(offx2 (sota-scale size (- 0.33) chrome-factor))
(offy2 (sota-scale size (- 0.25) chrome-factor))
(feather (sota-scale size 0.5 chrome-factor))
(brush-size (sota-scale size 0.5 chrome-factor))
(mask (car (gimp-channel-new img width height "Chrome Stencil" 50 '(0 0 0))))
(bg-layer (car (gimp-layer-new img width height GRAY-IMAGE "Background" 100 NORMAL-MODE)))
(layer1 (car (gimp-layer-new img banding-width banding-height banding-type "Layer1" 100 NORMAL-MODE)))
(layer2 (car (gimp-layer-new img width height GRAYA-IMAGE "Layer 2" 100 DIFFERENCE-MODE)))
(layer3 (car (gimp-layer-new img width height GRAYA-IMAGE "Layer 3" 100 NORMAL-MODE)))
(shadow (car (gimp-layer-new img width height GRAYA-IMAGE "Drop Shadow" 100 NORMAL-MODE)))
1997-11-24 22:05:25 +00:00
(mask-fs 0)
(layer-mask 0))
(gimp-context-push)
1999-10-17 00:07:55 +00:00
(gimp-image-undo-disable img)
1997-11-24 22:05:25 +00:00
(gimp-image-add-channel img mask 0)
(gimp-image-add-layer img bg-layer 0)
(gimp-image-add-layer img shadow 0)
(gimp-image-add-layer img layer3 0)
(gimp-image-add-layer img layer2 0)
(gimp-edit-copy mask-drawable)
(set! mask-fs (car (gimp-edit-paste mask FALSE)))
1997-11-24 22:05:25 +00:00
(gimp-floating-sel-anchor mask-fs)
(if (= carve-white FALSE)
(gimp-invert mask))
1997-11-24 22:05:25 +00:00
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-22 18:43:09 +00:00
(gimp-context-set-background '(255 255 255))
1997-11-24 22:05:25 +00:00
(gimp-selection-none img)
(gimp-edit-fill layer2 BACKGROUND-FILL)
(gimp-edit-fill layer3 BACKGROUND-FILL)
(gimp-edit-clear shadow)
1997-11-24 22:05:25 +00:00
(gimp-drawable-set-visible bg-layer FALSE)
(gimp-drawable-set-visible shadow FALSE)
1997-11-24 22:05:25 +00:00
(gimp-selection-load mask)
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-22 18:43:09 +00:00
(gimp-context-set-background '(0 0 0))
1997-11-24 22:05:25 +00:00
(gimp-selection-translate img offx1 offy1)
(gimp-selection-feather img feather)
(gimp-edit-fill layer2 BACKGROUND-FILL)
1997-11-24 22:05:25 +00:00
(gimp-selection-translate img (* 2 offx2) (* 2 offy2))
(gimp-edit-fill layer3 BACKGROUND-FILL)
1997-11-24 22:05:25 +00:00
(gimp-selection-none img)
(set! layer2 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
(gimp-invert layer2)
1997-11-24 22:05:25 +00:00
(gimp-image-add-layer img layer1 0)
1997-11-24 22:05:25 +00:00
(copy-layer-chrome-it img layer1 banding-img banding-layer)
(gimp-image-delete banding-img)
(gimp-layer-scale layer1 width height FALSE)
(plug-in-gauss-iir 1 img layer1 10 TRUE TRUE)
(gimp-layer-set-opacity layer1 50)
(set! layer1 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
(gimp-curves-spline layer1 0 18 (spline-chrome-it))
1997-11-24 22:05:25 +00:00
(set! layer-mask (car (gimp-layer-create-mask layer1 ADD-BLACK-MASK)))
marked gimp_image_add_layer_mask() and gimp_image_remove_layer_mask() as 2003-12-08 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/image.pdb: marked gimp_image_add_layer_mask() and gimp_image_remove_layer_mask() as deprecated. Didnn't remove them from the PDB because the new functions' signature differs and they are used very often in scripts, but removed them from the libgimp C wrappers. * tools/pdbgen/pdb/layer.pdb: added gimp_layer_add_mask() and gimp_layer_remove_mask(). * libgimp/gimpcompat.h: added compat cruft. * app/pdb/image_cmds.c * app/pdb/internal_procs.c * app/pdb/layer_cmds.c * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.[ch]: regenerated. * libgimp/gimpexport.c * plug-ins/common/curve_bend.c * plug-ins/common/psd.c * plug-ins/pygimp/pygimp-image.c * plug-ins/script-fu/scripts/3d-outline.scm * plug-ins/script-fu/scripts/alien-neon-logo.scm * plug-ins/script-fu/scripts/blended-logo.scm * plug-ins/script-fu/scripts/burn-in-anim.scm * plug-ins/script-fu/scripts/carve-it.scm * plug-ins/script-fu/scripts/carved-logo.scm * plug-ins/script-fu/scripts/chrome-it.scm * plug-ins/script-fu/scripts/chrome-logo.scm * plug-ins/script-fu/scripts/coolmetal-logo.scm * plug-ins/script-fu/scripts/crystal-logo.scm * plug-ins/script-fu/scripts/fade-outline.scm * plug-ins/script-fu/scripts/frosty-logo.scm * plug-ins/script-fu/scripts/image-structure.scm * plug-ins/script-fu/scripts/news-text.scm * plug-ins/script-fu/scripts/rendermap.scm * plug-ins/script-fu/scripts/slide.scm * plug-ins/script-fu/scripts/sota-chrome-logo.scm * plug-ins/script-fu/scripts/speed-text.scm * plug-ins/script-fu/scripts/starburst-logo.scm * plug-ins/script-fu/scripts/textured-logo.scm * plug-ins/script-fu/scripts/weave.scm * plug-ins/script-fu/scripts/xach-effect.scm * plug-ins/xjt/xjt.c: changed accordingly. 2003-12-08 Michael Natterer <mitch@gimp.org> * libgimp/libgimp-sections.txt * libgimp/tmpl/gimpimage.sgml * libgimp/tmpl/gimplayer.sgml: follow layer mask API change.
2003-12-08 22:33:17 +00:00
(gimp-layer-add-mask layer1 layer-mask)
(gimp-selection-load mask)
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-22 18:43:09 +00:00
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill layer-mask BACKGROUND-FILL)
1997-11-24 22:05:25 +00:00
(set! layer2 (car (gimp-layer-copy layer1 TRUE)))
(gimp-image-add-layer img layer2 0)
plug-ins/script-fu/scripts/3d-outline.scm 2004-09-23 Michael Natterer <mitch@gimp.org> * plug-ins/script-fu/scripts/3d-outline.scm * plug-ins/script-fu/scripts/beveled-pattern-arrow.scm * plug-ins/script-fu/scripts/beveled-pattern-bullet.scm * plug-ins/script-fu/scripts/beveled-pattern-button.scm * plug-ins/script-fu/scripts/beveled-pattern-heading.scm * plug-ins/script-fu/scripts/beveled-pattern-hrule.scm * plug-ins/script-fu/scripts/blended-logo.scm * plug-ins/script-fu/scripts/carve-it.scm * plug-ins/script-fu/scripts/carved-logo.scm * plug-ins/script-fu/scripts/chip-away.scm * plug-ins/script-fu/scripts/chrome-it.scm * plug-ins/script-fu/scripts/coffee.scm * plug-ins/script-fu/scripts/comic-logo.scm * plug-ins/script-fu/scripts/coolmetal-logo.scm * plug-ins/script-fu/scripts/crystal-logo.scm * plug-ins/script-fu/scripts/frosty-logo.scm * plug-ins/script-fu/scripts/glossy.scm * plug-ins/script-fu/scripts/hsv-graph.scm * plug-ins/script-fu/scripts/land.scm * plug-ins/script-fu/scripts/lava.scm * plug-ins/script-fu/scripts/mkbrush.scm * plug-ins/script-fu/scripts/rendermap.scm * plug-ins/script-fu/scripts/select-to-brush.scm * plug-ins/script-fu/scripts/select-to-pattern.scm * plug-ins/script-fu/scripts/sota-chrome-logo.scm * plug-ins/script-fu/scripts/spyrogimp.scm * plug-ins/script-fu/scripts/starburst-logo.scm * plug-ins/script-fu/scripts/starscape-logo.scm * plug-ins/script-fu/scripts/t-o-p-logo.scm * plug-ins/script-fu/scripts/test-sphere.scm * plug-ins/script-fu/scripts/textured-logo.scm: use the new opacity, paint_mode, brush, pattern, gradient, palette and font accessors.
2004-09-23 11:44:32 +00:00
(gimp-context-set-brush (brush brush-size))
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-22 18:43:09 +00:00
(gimp-context-set-foreground '(255 255 255))
(gimp-edit-stroke layer-mask)
1997-11-24 22:05:25 +00:00
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-22 18:43:09 +00:00
(gimp-context-set-background '(0 0 0))
1997-11-24 22:05:25 +00:00
(gimp-selection-feather img (* feather 1.5))
(gimp-selection-translate img (* 2.5 offx1) (* 2.5 offy1))
(gimp-edit-fill shadow BACKGROUND-FILL)
1997-11-24 22:05:25 +00:00
(gimp-selection-all img)
plug-ins/script-fu/scripts/3d-outline.scm 2004-09-23 Michael Natterer <mitch@gimp.org> * plug-ins/script-fu/scripts/3d-outline.scm * plug-ins/script-fu/scripts/beveled-pattern-arrow.scm * plug-ins/script-fu/scripts/beveled-pattern-bullet.scm * plug-ins/script-fu/scripts/beveled-pattern-button.scm * plug-ins/script-fu/scripts/beveled-pattern-heading.scm * plug-ins/script-fu/scripts/beveled-pattern-hrule.scm * plug-ins/script-fu/scripts/blended-logo.scm * plug-ins/script-fu/scripts/carve-it.scm * plug-ins/script-fu/scripts/carved-logo.scm * plug-ins/script-fu/scripts/chip-away.scm * plug-ins/script-fu/scripts/chrome-it.scm * plug-ins/script-fu/scripts/coffee.scm * plug-ins/script-fu/scripts/comic-logo.scm * plug-ins/script-fu/scripts/coolmetal-logo.scm * plug-ins/script-fu/scripts/crystal-logo.scm * plug-ins/script-fu/scripts/frosty-logo.scm * plug-ins/script-fu/scripts/glossy.scm * plug-ins/script-fu/scripts/hsv-graph.scm * plug-ins/script-fu/scripts/land.scm * plug-ins/script-fu/scripts/lava.scm * plug-ins/script-fu/scripts/mkbrush.scm * plug-ins/script-fu/scripts/rendermap.scm * plug-ins/script-fu/scripts/select-to-brush.scm * plug-ins/script-fu/scripts/select-to-pattern.scm * plug-ins/script-fu/scripts/sota-chrome-logo.scm * plug-ins/script-fu/scripts/spyrogimp.scm * plug-ins/script-fu/scripts/starburst-logo.scm * plug-ins/script-fu/scripts/starscape-logo.scm * plug-ins/script-fu/scripts/t-o-p-logo.scm * plug-ins/script-fu/scripts/test-sphere.scm * plug-ins/script-fu/scripts/textured-logo.scm: use the new opacity, paint_mode, brush, pattern, gradient, palette and font accessors.
2004-09-23 11:44:32 +00:00
(gimp-context-set-pattern "Marble #1")
(gimp-edit-bucket-fill bg-layer PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
1997-11-24 22:05:25 +00:00
(gimp-selection-none img)
(gimp-image-convert-rgb img)
1997-11-24 22:05:25 +00:00
(gimp-color-balance layer1 0 TRUE (shadows (rval hc)) (shadows (gval hc)) (shadows (bval hc)))
(gimp-color-balance layer1 1 TRUE (midtones (rval hc)) (midtones (gval hc)) (midtones (bval hc)))
(gimp-color-balance layer1 2 TRUE (highlights (rval hc)) (highlights (gval hc)) (highlights (bval hc)))
1997-11-24 22:05:25 +00:00
(gimp-color-balance layer2 0 TRUE (shadows (rval cc)) (shadows (gval cc)) (shadows (bval cc)))
(gimp-color-balance layer2 1 TRUE (midtones (rval cc)) (midtones (gval cc)) (midtones (bval cc)))
(gimp-color-balance layer2 2 TRUE (highlights (rval cc)) (highlights (gval cc)) (highlights (bval cc)))
(gimp-hue-saturation layer2 0 0 chrome-lightness chrome-saturation)
1997-11-24 22:05:25 +00:00
(gimp-drawable-set-visible shadow TRUE)
(gimp-drawable-set-visible bg-layer TRUE)
1997-11-24 22:05:25 +00:00
(gimp-drawable-set-name layer2 "Chrome")
(gimp-drawable-set-name layer1 "Highlight")
1997-11-24 22:05:25 +00:00
(gimp-image-remove-channel img mask)
(gimp-display-new img)
(gimp-image-undo-enable img)
(gimp-context-pop)))
1997-11-24 22:05:25 +00:00
(script-fu-register "script-fu-sota-chrome-it"
_"Stencil C_hrome..."
_"Add a chrome effect to the selected region (or alpha) using a specified (grayscale) stencil"
1997-11-24 22:05:25 +00:00
"Spencer Kimball"
"Spencer Kimball"
"1997"
"GRAY"
SF-IMAGE "Chrome image" 0
SF-DRAWABLE "Chrome mask" 0
SF-ADJUSTMENT _"Chrome saturation" '(-80 -100 100 1 10 0 0)
SF-ADJUSTMENT _"Chrome lightness" '(-47 -100 100 1 10 0 0)
SF-ADJUSTMENT _"Chrome factor" '(.75 0 1 .1 .01 2 0)
SF-FILENAME _"Environment map"
(string-append ""
gimp-data-directory
"/scripts/images/beavis.jpg")
SF-COLOR _"Highlight balance" '(211 95 0)
SF-COLOR _"Chrome balance" "black"
SF-TOGGLE _"Chrome white areas" TRUE)
(script-fu-menu-register "script-fu-sota-chrome-it"
"<Image>/Filters/Decor")