clintbellanger/flare — Issue #209: Update render8dirs.py for Blender 2.6 Python API
Author: clintbellanger
Created: 2011-12-03 20:22:57+00:00
State: open
Labels: Feature

For reference, here's the old script for 2.49. It looks for an object named "RenderPlatform", rotates it 45 degrees, then renders the animation (output files named appropriately). This continues until the animation is rendered in all 8 directions.

---

import Blender
from Blender import *
from Blender.Scene import Render

pi = 3.14159
deg45 = 45 * pi / 180

context = Scene.GetCurrent().getRenderingContext()
basePath = context.renderPath

for i in range(1,9):
# objects without parents should be parented to RenderPlatform
platform = Object.Get('RenderPlatform')
platform.RotZ = platform.RotZ - deg45
platform.setLocation(platform.getLocation()) # refreshes the child locations
context.renderPath = basePath + str(i)
context.renderAnim()
Blender.Redraw()
context.renderPath = basePath