I have the script shown below which I’ve used happily for years. The script is designed to render 10 images in total. The first 4 are from cameras in the corners of a room. The next 6 are from cameras in the center of the room pointed in 6 directions with proper lens settings for a quicktime panorama mov file. The script still works fine to generate the images but the trouble I have is that I no longer have a method for selecting YafRay as the rendering engine.
Unfortunately, the new version of Blender does not allow me to select YafRay on the Render section and set that as the default rendering engine. So, the script always uses Blender Internal. It seems I have to use the Render->YafRay Export 0.1.1 options to create a YafRay render but I do not know how to automate this.
It’s somewhat critical to my workflow since I usually spend all evening modeling and then kick off my normal set of 10 renders just before I go to bed. They often take all night to render. So, it’s painful to do this manually and I have become fond of YafRay. I’d rather not return to BI.
So, if anyone could help me understand how to modify this script to render to YafRay instead of Blender internal. I would be extremely grateful!
import Blender
from Blender import *
scn = Scene.getCurrent()
cntx = scn.getRenderingContext()
frame = cntx.currentFrame()
frame = 1;
while frame < 11:
if (frame==1):
cntx.imageSizeX(1280)
cntx.imageSizeY(1024)
Scene.getCurrent().setCurrentCamera(Object.Get("Camera01"))
if (frame==2):
cntx.imageSizeX(1280)
cntx.imageSizeY(1024)
Scene.getCurrent().setCurrentCamera(Object.Get("Camera02"))
if (frame==3):
cntx.imageSizeX(1280)
cntx.imageSizeY(1024)
Scene.getCurrent().setCurrentCamera(Object.Get("Camera03"))
if (frame==4):
cntx.imageSizeX(1280)
cntx.imageSizeY(1024)
Scene.getCurrent().setCurrentCamera(Object.Get("Camera04"))
if (frame==5):
cntx.imageSizeX(1000)
cntx.imageSizeY(1000)
Scene.getCurrent().setCurrentCamera(Object.Get("Camera05"))
if (frame==6):
cntx.imageSizeX(1000)
cntx.imageSizeY(1000)
Scene.getCurrent().setCurrentCamera(Object.Get("Camera06"))
if (frame==7):
cntx.imageSizeX(1000)
cntx.imageSizeY(1000)
Scene.getCurrent().setCurrentCamera(Object.Get("Camera07"))
if (frame==8):
cntx.imageSizeX(1000)
cntx.imageSizeY(1000)
Scene.getCurrent().setCurrentCamera(Object.Get("Camera08"))
if (frame==9):
cntx.imageSizeX(1000)
cntx.imageSizeY(1000)
Scene.getCurrent().setCurrentCamera(Object.Get("Camera09"))
if (frame==10):
cntx.imageSizeX(1000)
cntx.imageSizeY(1000)
Scene.getCurrent().setCurrentCamera(Object.Get("Camera10"))
cntx.startFrame(frame)
cntx.endFrame(frame)
scn.update()
cntx.renderAnim()
frame=frame+1