c4d.CameraObject

class c4d.CameraObject

Represents a Camera object.

The instance object class of type Ocamera.

Methods Signatures

CameraObject.__init__(self)
rtype:c4d.CameraObject
CameraObject.GetProjection(self) Get the camera projection.
CameraObject.GetFocus(self) Get the focus of the camera.
CameraObject.GetZoom(self) Get the zoom of the camera.
CameraObject.GetOffset(self) Return the offset.
CameraObject.GetAperture(self) Return the aperture width.
CameraObject.SetProjection(self, projection) Set the camera projection.
CameraObject.SetFocus(self, v) Set the focus of the camera.
CameraObject.SetZoom(self, zoom) Set the zoom of the camera.
CameraObject.SetOffset(self, offset) Set the offset.
CameraObject.SetAperture(self, v) Set the aperture width.
CameraObject.StereoGetCameraCount(self, doc, bd, rd[, flags]) Returns the number of stereoscopic cameras.
CameraObject.StereoGetCameraInfo(self, doc, bd, rd, n[, ...]) Returns the information for a stereoscopic camera.

Inheritance

Parent Class:

Methods Documentation

CameraObject.__init__(self)
Return type:c4d.CameraObject
Returns:The new camera.
CameraObject.GetProjection(self)

Get the camera projection.

Return type:int
Returns:The projection. See Ocamera.h for values.
CameraObject.GetFocus(self)

Get the focus of the camera.

Return type:float
Returns:The focus.
CameraObject.GetZoom(self)

Get the zoom of the camera.

Return type:float
Returns:The zoom.
CameraObject.GetOffset(self)

Return the offset.

Return type:c4d.Vector
Returns:The offset.
CameraObject.GetAperture(self)

Return the aperture width.

Return type:float
Returns:The camera’s aperture.
CameraObject.SetProjection(self, projection)

Set the camera projection.

Parameters:projection (int) – The projection. See Ocamera.h for values.
CameraObject.SetFocus(self, v)

Set the focus of the camera.

Parameters:v (float) – The focus.
CameraObject.SetZoom(self, zoom)

Set the zoom of the camera.

Parameters:zoom (float) – The zoom.
CameraObject.SetOffset(self, offset)

Set the offset.

Parameters:offset (c4d.Vector) – The offset.
CameraObject.SetAperture(self, v)

Set the aperture width.

Parameters:v (float) – The camera’s aperture.
CameraObject.StereoGetCameraCount(self, doc, bd, rd, flags=0)

Returns the number of stereoscopic cameras.

New in version R19.

Parameters:
Return type:

int

Returns:

The number of stereoscopic cameras.

CameraObject.StereoGetCameraInfo(self, doc, bd, rd, n, flags=0)

Returns the information for a stereoscopic camera.

New in version R19.

Parameters:
Return type:

dict{‘m’: c4d.Matrix, ‘off_x’: float, ‘off_y’: float, ‘name’: str}

Returns:

A dictionary (None if the function failed) with the stereo camera information:

’m’: Stereoscopic camera matrix.
’off_x’: Stereoscopic camera film X offset.
’off_y’: Stereoscopic camera film Y offset.
’name’: Stereoscopic camera name.