User Tools

Site Tools


blender_export_opengl

This code captures the 3d view and save an image in the provided outputPath <code python> import bpy def captGL(outputPath): '''Capture opengl in blender viewport and save the render''' # save current render outputPath temp = bpy.context.scene.render.filepath # Update output bpy.context.scene.render.filepath = outputPath # render opengl and write the render bpy.ops.render.opengl(write_still=True) # restore previous output path bpy.context.scene.render.filepath = temp # Capture the opengl view and save it in the provided path captGL("/u/temp/tmp.png") </code>

blender_export_opengl.txt · Last modified: 2015/08/20 15:45 by flavio