ddg.visualization.blender.camera module
- ddg.visualization.blender.camera.camera(name='Camera', type='PERSP', location=(0.0, 0.0, 0.0), collection=None)[source]
Add a camera.
- Parameters:
- namestr, default=’Camera’
Name of the created camera
- typestr, default=’PERSP’
Type of the camera, ‘PERSP’, ‘ORTHO’ or ‘PANO’
- locationIterable of three floats, default=(0., 0., 0.)
location of the camera
- collectionbpy.types.collection, default=None
Collection to link camera to, If the parameter is not given or set to None the camera gets linked to bpy.context.scene.collection
- Returns:
- bpy.types.Camera
- ddg.visualization.blender.camera.look_at_point(camera_bobj, point, world_up=(0, 0, 1), distance=None)[source]
Rotates camera such that it looks at the given point.
See ddg.visualization.blender.object.look_at_point for full documentation.
- ddg.visualization.blender.camera.clear(cameras=None, do_unlink=True)[source]
Delete all given cameras.
- Parameters:
- camerasIterable of bpy.type.Camera (default=None)
Cameras to be deleted. If the argument is not provided or None all cameras will be deleted.
- do_unlinkbool (default=True)
Unlink cameras from their scenes, if needed, before deleting them.
- Returns:
- None
- ddg.visualization.blender.camera.set_background_image(camera_bobj, image_path)[source]
Add a background image to the camera.
The background image can be used as reference in the camera view but it won’t appear in the renders.
- Parameters:
- camera_bobjbpy.types.Object with a bpy.types.Camera as data
Camera object to which the image will be added.
- image_pathstr
Path to the image.
- ddg.visualization.blender.camera.set_background_movieclip(camera_bobj, movieclip_path)[source]
Add a background movieclip to the camera.
The background movieclip can be used as reference in the camera view but it won’t appear in the renders.
- Parameters:
- camera_bobjbpy.types.Object with a bpy.types.Camera as data
Camera object to which the movieclip will be added.
- image_pathstr
Path to the movieclip.