c4d.CameraObject¶
-
class
c4d.
CameraObject
¶ Represents a Camera object.
The instance object class of type Ocamera.
Methods Signatures
CameraObject.__init__(self) |
|
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: - doc (c4d.documents.BaseDocument) – The document for the operation.
- bd (c4d.BaseDraw) – The stereoscopic view.
- rd (c4d.documents.RenderData) – The stereoscopic render settings.
- flags (int) – Optional. Currently unused. Set to 0.
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: - doc (c4d.documents.BaseDocument) – The document for the operation.
- bd (c4d.BaseDraw) – The stereoscopic view.
- rd (c4d.documents.RenderData) – The stereoscopic render settings.
- n (int) – The stereoscopic camera index: 0 <= n <
StereoGetCameraCount()
- flags (int) – Optional. Currently unused. Set to 0.
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.