Gimptalk - Premier Gimp Community: Animated rain script not showing up - Gimptalk - Premier Gimp Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Animated rain script not showing up

#1 User is offline   Mario65889 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 1,382
  • Joined: 29-April 08
  • Locationis that your cologne? I think I smell gay essence dea eu

Posted 19 February 2009 - 12:07 AM

K downloaded it I see it in my computer I resaved it in notepad as .scm I refreshed it, But it's not showing up anywhere...I saved as ansi encoding any thing I'm doing wrong? heres the script

; 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.
;
;
; 
; Makes a copy of your image and creates an animated rain effect of the active layer
; as seen in my tutorial here: http://fence-post.deviantart.com/art/Gimp-Animated-Rain-35843590
; The animation may be saved with the gif-plug-in.
;
;
; Define the Function

(define (script-fu-rain-anim 	img		 
				drawable
				num-frames
				rain-amt
				blur-length
				blur-angle
				speed)

; Declare the Variables

	(let* 	(
		    (rain-layer)
		    (num-frames (max 1 num-frames))
		    (remaining-frames num-frames)
		    (newImage (car (gimp-image-duplicate img)))
		    (source-layer (car (gimp-image-get-active-layer newImage))) ; The original image (the animation will be based on
		    (center-x (/ (car (gimp-image-width newImage)) 2)) ; Gets the center of the image width for use in the motion blur plugin
		    (center-y (/ (car (gimp-image-height newImage)) 2)) ; Gets the center of the image height for use in the motion blur plugin
		)

  (gimp-image-undo-disable newImage)
  
  ; ****************************************************************************
  ; Creates a loop so that the operation will continue as long as the
  ; remaining-frames variable is greater than 0
  ; ****************************************************************************
  
  (while (> remaining-frames 0)
	
	  (let* (
	          (base-layer (car (gimp-layer-copy source-layer TRUE))) ; Sets the base layer to be a copy of the original image
	          (rain-layer (car (gimp-layer-copy source-layer TRUE))) ; Sets the rain-layer to be a copy of the original image
                  (layer-name (string-append "Frame " (number->string (- (+ num-frames 1)remaining-frames)) " (" (number->string speed) "ms)" " (replace)"))
	        )

    (gimp-image-add-layer newImage base-layer -1) ; Adds the base-layer to the new image
    (gimp-drawable-set-name base-layer layer-name) ; Sets the name of the base layer
    (gimp-image-add-layer newImage rain-layer -1) ; Adds the rain layer to the new image
    (gimp-drawable-fill rain-layer WHITE-FILL) ; fills rain layer with white

; ******************************************************************************
; Adds "rain" to the rain layer via the rgb-noise plugin.  The noise amounts were
; specified by the user in the pop-up window when the script was first run
; ******************************************************************************

    (plug-in-rgb-noise  RUN-NONINTERACTIVE
                        newImage
                        rain-layer
                        0
                        0
                        rain-amt
		        	rain-amt
                        rain-amt
                        0)

; ******************************************************************************
; Blurs the "rain" on the rain layer via the motion blur plugin.  The blur length
; and angle were specified by the user in the pop-up window when the script was first run.
; ******************************************************************************

    (plug-in-mblur RUN-NONINTERACTIVE
			 newImage
			 rain-layer
			 LINEAR
			 blur-length
			 blur-angle
			 center-x
			 center-y)

; Sets the rain layer blend mode to multiply

    (gimp-layer-set-mode rain-layer MULTIPLY-MODE)

; Merges the rain layer with the base layer below it

    (gimp-image-merge-down newImage rain-layer CLIP-TO-IMAGE)

; Reduces the remaining frames variable by 1  

    (set! remaining-frames (- remaining-frames 1))
    )
  )

; Removes the original layer from the stack because it's no longer needed  
  
  (gimp-image-remove-layer newImage source-layer) 

 
  (gimp-image-undo-enable newImage)

; Displays the final animation

  (gimp-display-new newImage)
  )
)

(script-fu-register "script-fu-rain-anim"
  "/Video/Animation FX/ Rain..."
  "Creates a multi-layer image with a rain effect"
  "Art Wade"
  "Art Wade"
  "12/26/2007"
  "RGB* GRAY*"
  SF-IMAGE       	"Image" 0				; first required parameter for operating on an open image
  SF-DRAWABLE    	"Drawable" 0				; second required parameter for operating on an open image
  SF-ADJUSTMENT 	"Number of frames" '(3 1 10 1 10 0 1)	; user selects the number of frames the animation will have
  SF-ADJUSTMENT 	"Amount of rain" '(.5 .1 1 .1 .2 1 1)	; user selects the amount of "rain" each frame will have
  SF-ADJUSTMENT 	"Blur length" '(10 5 256 1 10 0 1) 	; user selects how length of blur applied to each raindrop
  SF-ADJUSTMENT 	"Blur angle" '(135 45 135 1 10 0 1)	; user selects the angle of the rain
  SF-ADJUSTMENT 	"Speed" '(40 10 500 1 1 0 1)		; users selects how fast the animation will play
)





I think I found the problem... I don't think it should be in images should it?

Edit:nvm it was in the folder video
Posted Image
Posted Image

Quote

If you can't beat someone,hire a thug to beat them up.-George Carlin
0

#2 User is offline   PhotoComix 

  • GT Senior Moderator
  • Group: Senior Moderators
  • Posts: 11,288
  • Joined: 13-June 05

Posted 19 February 2009 - 01:10 AM

Hy where you get that script :?: :shock:
I'm curious because that is not the original script, i am sure because i edited that menu path (...Video/Animation FX/ ...)to move the script in the same menu of GAP on my PC
but that script was for gimp 2.4 i am not sure will work in gimp 2.6

For sure THIS version http://fence-post.de...Script-73356776 will work.

Quote

..I saved as ansi encoding


:?: I can't follow you here, you just have to save as it is,with is .scm extension

in windows you get them saving as "all files"...
0

#3 User is offline   Mario65889 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 1,382
  • Joined: 29-April 08
  • Locationis that your cologne? I think I smell gay essence dea eu

Posted 19 February 2009 - 03:33 AM

Lol i have 2.4 I'm about a year behind...
Posted Image
Posted Image

Quote

If you can't beat someone,hire a thug to beat them up.-George Carlin
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic