Forum: Poser - OFFICIAL


Subject: Render by specific frames?

TheOwl opened this issue on Nov 22, 2011 · 13 posts


markschum posted Wed, 23 November 2011 at 1:10 AM

import poser
import os

frameslst  = [0,5,10] <<<<<<<<<<<<<<<<<<<the frames to render

process each file in the list

for cf in frameslst:
    # create output name
    cfp ="c:/documents and settings/owner/my documents/my renders/" <<< path to save files in
    cfo =  cfp + "render_" + str(cf) + ".png"
    # get the scene and set render type - use current render options
    scn = poser.Scene()
    scn.SetCurrentRenderEngine(poser.kRenderEngineCodeFIREFLY)
    scn.SetFrame(cf)
    # render the scene
    prr = scn.Render()
    print prr
    # save the image , same path, as png
    print "Saving image as: " + cfo
    scn.SaveImage("png", myfilepath  + cfo ) <<<<< remove myfilepath + from this line

print "done!"

 

rename the txt file to a py file and save anywhere in the runtime/python/poserscripts folder

just edit the two lines shown using wordpad or other text editor

run from the file > run python script menu

an error in rendering will stop the script  so without a render queue its a bit of run it and hope for the best.