Do you know how could I render a scene with luxrender using the python API of blender and luxrender ?

I found their Python API, but I don't find a way to render the scene thanks to luxrender with a python script.

My algortihm for the script would be : - Load a scene with only one object - Change the texture of the scene with a texture given in parameters - Render the scene during 30s to 1min - Save the image

I know it doesn't seem complicated, but I don't know how to start


1 Answer 1


While not specific to luxrender, some steps you can do to help with scripting.

Find an interface item that performs the task you want to perform or displays the value you wish to change in your script.

Look at the tooltips for the item, the data path or operator path is shown for most items.

Right clicking on an item allows you to "Copy Data Path". Another option is "Edit Source" which will open the script responsible for drawing the item and will even place the cursor on the relevant line for you. Remember that some names used in the scripts will be variables that have been defined earlier in the script.

For example the Render button tooltip will show you bpy.ops.render.render() that is the python line you put in your script to start rendering.

The render menu at the top will show you bpy.data.scenes["Scene"].render.engine which is a way to access the render engine for a scene named "Scene". Another way to access the same data is bpy.context.scene.render.engine While bpy.data.scenes[] allows you to access a specific scene, bpy.context.scene gives you access to the current scene.

So if bpy.context.scene.render.engine equals 'LUXRENDER_RENDER' and you call bpy.ops.render.render() then Luxrender will perform the rendering (as long as you have the luxblend25 addon installed and enabled)


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .