How can I write a light-field rendering script

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
justinhark
Posts: 0
Joined: Mon Jul 15, 2013 2:10 am

How can I write a light-field rendering script

Post by justinhark »

Dear friends, I hope to write a script to render a light-field video Basically, I hope to move the camera to one position, and then render a video to the disk, then move the camera to a new position, and render a video, and so on. I wonder how can I write such a script? Familiar with python, but have no clue how can I set the position of a camera and how can I trigger the video rendering with a defined output filename.

Thanks so much!
Justin

CoDEmanX
Posts: 0
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Post by CoDEmanX »

not sure if python is really needed, you could link-duplicate your scene add change scene's camera location. Then render all scenes.

But you can of course change camera with python as well, basically like

Code: Select all

ob = bpy.context.scene.camera
if ob is None:
    raise Exception("no scene cam")
ob.location = (1,2,3) # set to location 1,2,3

ob.rotation_euler = (...) # or rotation_quaternion or rotation_axisangle
# depends on rotation_mode

# or use ob.matrix_world directly, you need to construct a proper matrix first
I'm sitting, waiting, wishing, building Blender in superstition...

Post Reply