I am processing blender file using python script passed in -P cmd argument

I am new to blender so I am not familiar with all bpy objects/properties. Can you help me with it?

1) How can I get current rendering tile and estimated time in cycles rendering engine? I know there is render_stats handler, and I even found function BlenderSession::get_progress in sources, but I am still puzzled how can I get this info from python script.

2) How can I get list of cameras available?

3) How can I setup active camera for rendering?

4) How can I get/set number of samples when rendering?

  • 6
    $\begingroup$ Hi, this site works best when asking one question at a time. I would recommend searching this site to see if each question exists and then post them as new questions if they don't. $\endgroup$ – Ray Mairlot Apr 24 '15 at 17:16

To know how to access properties in python just hover the mouse over the property in the UI and read the tooltip

# render tiles

#camera's list
cam_list = [cam for cam in bpy.data.object if object.type == 'CAMERA']

#set camera
scene.camera = cam_list[0]
scene.camera = bpy.context.object
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.