c4d.CameraObject¶
-
class
c4d.
CameraObject
¶ Represents a Camera object.
The instance object class of type Ocamera.
Methods Signatures
Get the camera projection. |
|
Get the focus of the camera. |
|
Get the zoom of the camera. |
|
Return the offset. |
|
Return the aperture width. |
|
Set the camera projection. |
|
Set the focus of the camera. |
|
Set the zoom of the camera. |
|
Set the offset. |
|
Set the aperture width. |
|
|
Returns the number of stereoscopic cameras. |
|
Returns the information for a stereoscopic camera. |
Inheritance
Parent Class:
Methods Documentation
-
CameraObject.
__init__
(self)¶
-
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
- 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
Optional[Dict[c4d.Matrix, float, float, 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.