Forum: Poser Python Scripting


Subject: Helllllllllllllllllp

DSQRD opened this issue on Jan 19, 2007 ยท 7 posts


adp001 posted Fri, 19 January 2007 at 10:35 AM

Seems you want to know how to do it with Python, not Poser :)

Couldn't test it because I'm at work. But I think it should do:

<pre style="background-color:#FFFFFF;padding-left:5mm;">
import poser<br></br><br></br>imgext = "jpg"                      # image format<br></br>imagepath = "c:images"             # path where images are stored<br></br>filename = "newimage_%05d"          # mask for image filenames<br></br>                                    # %05d will be replace with framenumber<br></br><br></br>sf = poser.Scene().Frame()          # save current framenumber<br></br>frcount = poser.Scene().NumFrames() # number of frames available<br></br><br></br>for framenr in range(frcount) :     # loop trough all frames<br></br>    poser.Scene().SetFrame(framenr) # set the framenumber to work with<br></br>    poser.Scene().Render()          # start the render process<br></br><br></br>    # Poser stops python until<br></br>    # the renderprocess is finished<br></br><br></br>    # save the image<br></br>    poser.Scene().SaveImage(imgext,filename % framenr)<br></br><br></br>poser.Scene().SetFrame(sf)          # back to the frame we started<br></br>