Paul Francis opened this issue on May 17, 2009 · 7 posts
ockham posted Sun, 17 May 2009 at 11:36 AM
If you have a standard location, this little script will render and save to your preferred
location in one click. It gives each file a name like Render_02, automatically
incrementing so it won't overwrite.
Note that the StandardPath must be filled in the script itself (fourth line), and it must
be written in the usual "programmer's style" with double backslashes.
To save TIF or PNG, just substitute "tif" or "png" for "bmp" in the next-to-last line.
import poser
import os
scene = poser.Scene()
StandardPath="c:downloads"
if not os.path.exists(StandardPath): os.mkdir(StandardPath)
for N in range(0,100): # 100 should be enough
TryName = os.path.join(StandardPath, ("Render_%.2d.bmp" % N))
if not os.path.isfile(TryName): # Doesn't exist. Save and stop.
scene.Render() # Delete this line if you want a save-only script
scene.SaveImage("bmp",TryName)
break