Skip to content

Instantly share code, notes, and snippets.

View c64cosmin's full-sized avatar

c64cosmin c64cosmin

View GitHub Profile
@c64cosmin
c64cosmin / exportscript.py
Created June 29, 2021 20:00
Export 8 angles in Blender
import bpy
import os
def rotate_and_render(angle, output_dir, output_set):
newcamera = "Camera.00"+str(angle)
bpy.context.scene.camera = bpy.context.scene.objects[newcamera] #set camera
bpy.context.scene.render.filepath = os.path.join(output_dir, output_set+str(angle)+".png") #set export path
bpy.ops.render.render(write_still = True) #start rendering