Module Camera
[frames] | no frames]

Module Camera

The Blender.Camera submodule.

New: Camera.clearScriptLinks accepts a parameter now.

Camera Data

This module provides access to Camera Data objects in Blender.

Example:

       from Blender import Camera, Object, Scene
       cam = Camera.New('ortho')   # create new ortho camera data
       cam.scale = 6.0             # set scale value for ortho view
       scn = Scene.GetCurrent()    # get current scene
       ob = scn.objects.new(cam)   # add a new camera object from the data
       scn.setCurrentCamera(ob)    # make this camera the active
Classes
  Camera
This object gives access to Camera-specific data in Blender.
Functions
Blender Camera
New(type='persp', name='CamData')
Create a new Camera Data object.
Blender Camera or a list of Blender Cameras
Get(name=None)
Get the Camera Data object(s) from Blender.
Variables
  __package__ = None
Function Details

New(type='persp', name='CamData')

 

Create a new Camera Data object.

Parameters:
  • type (string) - The Camera type: 'persp' or 'ortho'.
  • name (string) - The Camera Data name.
Returns: Blender Camera
The created Camera Data object.

Get(name=None)

 

Get the Camera Data object(s) from Blender.

Parameters:
  • name (string) - The name of the Camera Data.
Returns: Blender Camera or a list of Blender Cameras
It depends on the name parameter:
  • (name): The Camera Data object with the given name;
  • (): A list with all Camera Data objects in the current scene.