new and useful script...

I am not sure if anyone had made this before, but it appears to me that this one works as well as any.
The script first creates a .bat file and runs it, and quits blender.
The batch file then renders the file, changes the outputted file’s extension (neccessary on my computer) and then shuts down the computer,
This is very useful for long renders, and it should work only on both windows 98, ME, 2000 and XP.
I have not tested it on XP, so if someone could tell me if it works would be great.
Make sure no other programs are running when you leave the computer for the night.
It works with the standard blender installation directory.

extension = '.jpg' ###### edit this line for output format##########
##### night long render thingy v .0001 by SamAdam ######
import Blender, os, sys

name = Blender.Get('filename')

no = 0
for a in name:
	no = no + 1
	if a == "\\" :
		noslash = no
	if a == "." :
		noblend = no - 1

filenamebat = "%sautorunblender.bat" % name[:noslash]

fb = open(filenamebat, 'w')

st = 'cd "C:\\Program Files\\Blender Foundation\\Blender"
st += 'Blender -b "%s" -f 1 
' % name
st += 'cd %srender
' % name[:noslash]
st += 'rename 0001 0001%s
' % extension
st += 'SHUTDOWN -s -t 01
st += 'C:\WINDOWS\RUNDLL32 SHELL32.DLL,SHExitWindowsEx 9'


Does it help render times, or just make the whole process more manageable? I’m afraid I’m on OS X, otherwise I’d test it for you.

render times do improve a little because less memory is used to store the gui.

If it could be use to create and run a bat file, isn’t that a way to execute a script virus ?

neat… and if I want to render directly into an AVI? (sorry, i don’t know much of blender’s commands in the command line)

Very usefull script I think. Like when you are rendering a movie in blender and it takes some time but the rendering process just overlaps your holiday, stop it and continue later? Nope run this script and when you come back, your pc is off :stuck_out_tongue: