I did read ahead and found this bit
But I do not know how to change it to create the files to a folder in the /tmp dir
It instead saves to the root of the drive.
import Rasterizer
cont = GameLogic.getCurrentController()
obj = cont.getOwner()
sep = ""
num = str(obj.counter)
filename = sep.join([num,".jpg"])
#Un-comemnt the following line will save a bitmap every frame to disk. SLOW!
Rasterizer.makeScreenshot(filename)
obj.counter += 1
Yeh I never figured that out either. sometimes it saves them in the programmes folder and sometimes in the directory where your blend file is. I just move them after its done…
The other thing is it does not put leading zeros on the file numbers so the order is wong when you finish. I use Lupas Rename to rename them, its very good. Must learn python sometime
Hey guys … I fixed the syntax to do what you want, I can’t test it though
import Rasterizer
cont = GameLogic.getCurrentController()
obj = cont.getOwner()
sep = ""
num = str(obj.counter)
num = '%(#)03d'%{"#":num} # puts leading Zeros =>prints as 001,002,010,100
filename = sep.join(["c:\\",num,".jpg"]) #added location (windows)
#Un-comemnt the following line will save a bitmap every frame to disk. SLOW!
Rasterizer.makeScreenshot(filename)
obj.counter += 1
under windows you need two backslashes such as c:\program files\ …etc
you can simply /user/temp under linux.
To add more numbers switch 03d to 05d… etc
Let me know how it goes
found it would not write the file so had a look and found num was a string in the original script and needed to be an integer.
import Rasterizer
cont = GameLogic.getCurrentController()
obj = cont.getOwner()
sep = “”
num = obj.counter
num = ‘%(#)03d’%{“#”:num} # puts leading Zeros =>prints as 001,002,010,100
filename = sep.join([“c:\Temp\Name”,num,“.jpg”]) #added location (windows) #where c:\Temp is the Location and ‘Name’ is the word appended to the front of the filename giving you Name001.jpg
#Un-comemnt the following line will save a bitmap every frame to disk. SLOW!
Rasterizer.makeScreenshot(filename)
obj.counter += 1
Thanks so much for doing this, I use the script a lot for making films and this will save me loads of time
(would still like to know why sometimes it creates PNGs for some reason…)