Guest User

Blender render animation in 8 directions

a guest
Sep 5th, 2013
124
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import bpy
  2. from math import radians
  3.  
  4. angle = -45
  5. axis = 2 # z-axis
  6. platform = bpy.data.objects["RenderPlatform"]
  7. original_path = bpy.data.scenes[0].render.filepath
  8.  
  9. for i in range(0,8):
  10.  
  11.     # rotate the render platform and all children
  12.     temp_rot = platform.rotation_euler
  13.     temp_rot[axis] = temp_rot[axis] - radians(angle)
  14.     platform.rotation_euler = temp_rot;
  15.  
  16.     # set the filename direction prefix
  17.     bpy.data.scenes[0].render.filepath = original_path + str(i)
  18.  
  19.     # render animation for this direction
  20.     bpy.ops.render.render(animation=True)
  21.  
  22. bpy.data.scenes[0].render.filepath = original_path
RAW Paste Data