;;; Plugin  : Shredded Text
;;; Author  : Rod Detmer
;;; Date    : August 6th 2012
;;; Revision: 1.0
;;; 					
;;; Version : 1.0
;;; Latest version at: http://www.gimpchat.com
;;; Required : Gimp 2.8 or later
;;;
;;; Description: 
;;; Creates a shredded steel text effect on your text colored #666666
;;; -----------------------------------------------------------------------------
;;; Change Log:
;;; Version-1.0
;;;
;;; License:
;;; 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-chiseled-steel-text image layer CenterX CenterY Bevel Noise HL-Mode ShadowMode)
  (gimp-image-undo-group-start image)
  (gimp-context-set-foreground '(102 102 102))
  (gimp-image-select-item image 0 layer)
  (gimp-edit-fill layer 0)
  (python-layer-fx-bevel-emboss 2 image layer 1 100 0 Bevel 0 120 30 1 '(255 255 255) HL-Mode 73 '(0 0 0) ShadowMode 38 0 1 "3 point tile" 100 100 1 1)
  (plug-in-hsv-noise RUN-NONINTERACTIVE image layer 4 0 0 Noise)
  (gimp-image-select-item image 0 layer)
  (plug-in-mblur RUN-NONINTERACTIVE image layer 0 12 0 CenterX CenterY) 
 ;(plug-in-hsv-noise RUN-NONINTERACTIVE image layer 3 0 0 Noise)
  (gimp-brightness-contrast layer 70 87)
  (python-layer-fx-drop-shadow 2 image layer '(0 0 0) 100 0 0 0 0 5 120 5 1 1)
  (gimp-selection-none image)
  (gimp-image-undo-group-end image)  
  (gimp-displays-flush image)
)

(script-fu-register
 "script-fu-chiseled-steel-text"
 "<Image>/Script-Fu/Text Effects/Chiseled Steel"
 "creates a steel effect on text"
 "Rod Detmer"
 "Rod Detmer"
 "August 2012" 
 "RGB* GRAY* INDEXED*"
 SF-IMAGE "The Image" 0
 SF-DRAWABLE "The Layer" 0
 SF-ADJUSTMENT "Bevel Size" '(23 0 250 1 10 0 SF-SLIDER)
 SF-ADJUSTMENT "Grit Noise" '(7 0 255 1 10 0 SF-SLIDER)
 SF-ADJUSTMENT "Motion-Blur Center X" '(400 0 1000 1 10 0 SF-SPINNER)
 SF-ADJUSTMENT "Motion-Blur Center Y" '(150 0 1000 1 10 0 SF-SPINNER)
 SF-OPTION "Highlight Mode" '( "Normal"     ; 0
                          "Dissolve"   ; 1
                          "Multiply"   ; 3
                          "Divide"     ; 15
                          "Screen"     ; 4
                          "Overlay"    ; 5
                          "Dodge"      ; 16
                          "Burn"       ; 17
                          "Hard light" ; 18
                          "Soft light" ; 19
                          "Grain extract" ; 20
                          "Grain merge" ; 21
                          "Difference" ; 6
                          "Addition"   ; 7
                          "Subtract"  ; 8
                          "Darken only" ; 9
                          "Lighten only" ; 10
                          "Hue" ; 11
                          "Saturation" ; 12
                          "Color" ; 13
                          "Value" ; 14
                          )
 SF-OPTION "Shadow Mode" '( "Normal"     ; 0
                          "Dissolve"   ; 1
                          "Multiply"   ; 3
                          "Divide"     ; 15
                          "Screen"     ; 4
                          "Overlay"    ; 5
                          "Dodge"      ; 16
                          "Burn"       ; 17
                          "Hard light" ; 18
                          "Soft light" ; 19
                          "Grain extract" ; 20
                          "Grain merge" ; 21
                          "Difference" ; 6
                          "Addition"   ; 7
                          "Subtract"  ; 8
                          "Darken only" ; 9
                          "Lighten only" ; 10
                          "Hue" ; 11
                          "Saturation" ; 12
                          "Color" ; 13
                          "Value" ; 14
                          )
)