Camera Manipulation (GUI and Headless)
Working with cameras in scripting is just like using the Camera tab in Project → Camera: You can create a camera, manipulate it to suit your needs, and save it.
>>> lux.newCamera("New") True >>> lux.setCameraLookAt(pt = (1, 1, 1)) # Example manipulation. >>> lux.saveCamera()
Inspect the cameras available:
>>> lux.getCameras() ['New', 'last_active', 'default']
Choose another camera:
Remove the camera you just created:
>>> lux.removeCamera("New") True >>> lux.getCameras() ['last_active', 'default']
If you remove the active camera it will choose the “Free Camera”.
You can also set a standard view:
The following 7 standard views are available:
Setting a standard view manipulates the active camera so you could create a camera for each standard view, but remember to save them.