I would like to create a python script that imports a 3d module, such as ‘3ds’, move and tilt the camera based on input parameters, then render the scene all from a command line. Please let me know if you can help, thanks.
Here is the bat file
“C:\Program Files (x86)\Blender Foundation\Blender\Blender.exe” -b -P test.py
Here is test.py
import Blender
from Blender import *
#Don’t know how to import
#load_3ds(‘C:\Temp\RenderEngine\Modules\fw33_3ds\fachwerk33T.3ds’);
sc=Scene.GetCurrent()
#Doesn’t work
camera = sc.objects.camera
#Need to get input parameters here
#Need to figure out how to move and rotate camera here.
context = sc.getRenderingContext()
context.render()
context.extensions = True
context.saveRenderedImage(“Test.jpg”)
Blender.Scene.Render.CloseRenderWindow()