Adding other types of objects is, in many cases, just as straightforward as adding our text object. If we want our scene to be populated in a way that enabled us to render it, we would have to add a camera and a lamp to make things visible. Adding a camera to the same scene could be done like this (assuming we still have a reference to our active scene in the
from Blender import Camera cam = Camera.New() # creates new camera data ob = scn.objects.new(cam) # adds a new camera object scn.setCurrentCamera(ob) # makes this camera active
Note that the
Camera objectï»¿ is again different from the actual camera data. A
Camera object holds camera-specific data, such as viewing angle, and a ...