- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Member Functions

# MFnCamera Class Reference
OpenMaya - API module for common classes | FunctionSet classes

Search for all occurrences

## Detailed Description

Function set for cameras.

Function set for creation, edit, and query of cameras.

Many of the camera settings only affect the resulting rendered image. E.g. the F/Stop, shutter speed, the film related options, etc.

Examples:

  animInfoCmd.cpp, D3DResourceManager.cpp, lineManip.cpp, lineManipContainer.cpp, moveNumericTool.cpp, moveTool.cpp, narrowPolyViewerCmd.cpp, scanDagCmd.cpp, scanDagSyntax.cpp, squareScaleManip.cpp, and zoomCameraCmd.cpp.

`#include <MFnCamera.h>`

Inheritance diagram for MFnCamera:
[legend]

List of all members.

## Public Types
enum | FilmFit { kFillFilmFit, kHorizontalFilmFit, kVerticalFilmFit, kOverscanFilmFit, kInvalid }
| Specifies how to fit the digital image to the film back. More...
## Public Member Functions
virtual MFn::Type | type () const
| Function set type.
virtual | ~MFnCamera ()
| Destructor.
| MFnCamera ()
| Default constructor.
| MFnCamera (MObject &object, MStatus *ReturnStatus=NULL)
| Constructor.
| MFnCamera (const MDagPath &object, MStatus *ret=NULL)
| Constructor.
MObject | create (MStatus *ReturnStatus=NULL)
| Creates a perspective camera and a transform to parent it.
MObject | create (MObject &parent, MStatus *ReturnStatus=NULL)
| Creates a perspective camera.
MPoint | eyePoint (MSpace::Space space=MSpace::kObject, MStatus *ReturnStatus=NULL) const
| Returns the eye point for the camera.
MVector | viewDirection (MSpace::Space space=MSpace::kObject, MStatus *ReturnStatus=NULL) const
| Returns the view direction for the camera.
MVector | upDirection (MSpace::Space space=MSpace::kObject, MStatus *ReturnStatus=NULL) const
| Returns the up direction vector for the camera.
MVector | rightDirection (MSpace::Space space=MSpace::kObject, MStatus *ReturnStatus=NULL) const
| Returns the right direction vector for the camera.
MPoint | centerOfInterestPoint (MSpace::Space space=MSpace::kObject, MStatus *ReturnStatus=NULL) const
| Returns the center of interest point for the camera.
MStatus | set (const MPoint &wsEyeLocation, const MVector &wsViewDirection, const MVector &wsUpDirection, double horizFieldOfView, double aspectRatio)
| Convenience routine to set the camera viewing parameters.
MStatus | setEyePoint (const MPoint &eyeLocation, MSpace::Space space=MSpace::kObject)
| Positions the eye-point of the camera keeping the center of interest fixed in space.
MStatus | setCenterOfInterestPoint (const MPoint &centerOfInterest, MSpace::Space space=MSpace::kObject)
| Positions the center-of-interest of the camera keeping the eye-point fixed in space.
bool | hasSamePerspective (const MDagPath &otherCamera, MStatus *ReturnStatus=NULL)
| Returns true if the camera has same perspective settings as the given camera.
MStatus | copyViewFrom (const MDagPath &otherCamera)
| Copy the camera settings related to the perspective from the given camera view.
MStatus | getFilmFrustum (double distance, MPointArray clipPlanes, bool applyPanZoom=false) const
| This method is not available in Python.
MStatus | getFilmFrustum (double distance, double &hSize, double &vSize, double &hOffset, double &vOffset, bool applyPanZoom=false) const
| Returns the film frustum for the camera.
MStatus | getPortFieldOfView (int width, int height, double &horizontalFOV, double &verticalFOV) const
| Compute the horizontal and vertical field of view in radians from the given viewport width and height.
MStatus | getViewParameters (double windowAspect, double &apertureX, double &apertureY, double &offsetX, double &offsetY, bool applyOverscan=false, bool applySqueeze=false, bool applyPanZoom=false) const
| Computes and returns the intermediate viewing frustum parameters for the camera.
MStatus | getViewingFrustum (double windowAspect, double &left, double &right, double &bottom, double &top, bool applyOverscan=false, bool applySqueeze=false, bool applyPanZoom=false) const
| Computes and returns the viewing frustum for the camera.
MStatus | getRenderingFrustum (double windowAspect, double &left, double &right, double &bottom, double &top) const
| Computes and returns the rendering frustum for the camera.
MFloatMatrix | projectionMatrix (MStatus *ReturnStatus=NULL) const
| Returns the orthographic or perspective projection matrix for the camera.
MFloatMatrix | projectionMatrix (MDGContext &context, MStatus *ReturnStatus=NULL) const
| Returns the orthographic or perspective projection matrix for the camera.
MStatus | setHorizontalFilmAperture (double hFilmAperture)
| Change the horizontal size of the camera aperture.
double | horizontalFilmAperture (MStatus *ReturnStatus=NULL) const
| Returns the horizontal film aperture for the camera.
MStatus | setVerticalFilmAperture (double vFilmAperture)
| Change the vertical size of the camera aperture.
double | verticalFilmAperture (MStatus *ReturnStatus=NULL) const
| Returns the vertical film aperture for the camera.
MStatus | getFilmApertureLimits (double &min, double &max) const
| Returns the maximum and minimum film aperture limits for the camera.
MStatus | setAspectRatio (double aspectRatio)
| Set the aspect ratio of the View.
double | aspectRatio (MStatus *ReturnStatus=NULL) const
| Returns the aspect ratio for the camera.
MStatus | getAspectRatioLimits (double &min, double &max) const
| Returns the minimum and maximum aspect ratio limits for the camera.
MStatus | setVerticalLock (bool lockFlag)
| Sets the vertical lock to on or off for the camera.
bool | isVerticalLock (MStatus *ReturnStatus=NULL) const
| Determines if vertical lock is turned on for the camera.
double | horizontalFilmOffset (MStatus *ReturnStatus=NULL) const
| Returns the horizontal offset of the film.
MStatus | setHorizontalFilmOffset (double hOffset)
| Change the horizontal offset of the film.
double | verticalFilmOffset (MStatus *ReturnStatus=NULL) const
| Change the vertical offset of the film.
MStatus | setVerticalFilmOffset (double vOffset)
| Change the vertical offset of the film.
bool | shakeEnabled (MStatus *ReturnStatus=NULL) const
| Returns the toggle value for the camera shake enabled attribute.
MStatus | setShakeEnabled (bool enabled)
| Changes the toggle value for the camera shake enabled attribute.
double | horizontalShake (MStatus *ReturnStatus=NULL) const
| Returns the horizontal offset of the film due to the shake attribute.
MStatus | setHorizontalShake (double hOffset)
| Change the horizontal film-based camera shake value.
double | verticalShake (MStatus *ReturnStatus=NULL) const
| Change the vertical film-based camera shake value.
MStatus | setVerticalShake (double vOffset)
| Changes the vertical film-based camera shake value.
bool | shakeOverscanEnabled (MStatus *ReturnStatus=NULL) const
| Returns the toggle value for the camera shake overscan attribute.
MStatus | setShakeOverscanEnabled (bool enabled)
| Changes the toggle value for the camera shake overscan enabled attribute.
double | shakeOverscan (MStatus *ReturnStatus=NULL) const
| Returns the camera shake overscan value.
MStatus | setShakeOverscan (double vOffset)
| Changes the camera shake overscan value.
bool | panZoomEnabled (MStatus *ReturnStatus=NULL) const
| Return the toggle value for the camera 2D pan/zoom enabled attribute.
MStatus | setPanZoomEnabled (bool enabled)
| Changes the toggle value for the camera 2D pan/zoom enabled attribute.
bool | renderPanZoom (MStatus *ReturnStatus=NULL) const
| Return the toggle value for the camera render 2D pan/zoom attribute.
MStatus | setRenderPanZoom (bool render)
| Changes the toggle value for the camera render 2D pan/zoom enabled attribute.
double | horizontalPan (MStatus *ReturnStatus=NULL) const
| Return the camera 2D horizontal pan value.
MStatus | setHorizontalPan (double hPan)
| Changes the camera 2D horizontal pan value.
double | verticalPan (MStatus *ReturnStatus=NULL) const
| Return the camera 2D vertical pan value.
MStatus | setVerticalPan (double vPan)
| Changes the camera 2D vertical pan value.
double | zoom (MStatus *ReturnStatus=NULL) const
| Return the camera 2D zoom value, which is the percent over the film viewable frustum to display.
MStatus | setZoom (double zoom)
| Changes the camera 2D zoom value.
bool | stereoHITEnabled (MStatus *ReturnStatus=NULL) const
| Returns the toggle value for the stereo HIT enabled attribute.
MStatus | setStereoHITEnabled (bool enabled)
| Changes the toggle value for the stereo HIT enabled attribute.
double | stereoHIT (MStatus *ReturnStatus=NULL) const
| Returns the camera stereo horizontal image translation (stereo HIT) value.
MStatus | setStereoHIT (double vOffset)
| Changes the camera stereo horizontal image translation (stereo HIT) value.
MStatus | setFilmFit (FilmFit filmFit)
| Sets how the digital image is to be fitted to the film back.
FilmFit | filmFit (MStatus *ReturnStatus=NULL) const
| Returns how the digital image is being fitted to the film back.
MStatus | setFilmFitOffset (double filmFitOffset)
| Set the film fit offset for the camera.
double | filmFitOffset (MStatus *ReturnStatus=NULL) const
| Returns the film fit offset for the camera.
MStatus | setOverscan (double overscan)
| Set the percent of overscan for this camera.
double | overscan (MStatus *ReturnStatus=NULL) const
| Returns the percent of overscan for this camera.
MStatus | setHorizontalRollPivot (double horizontalRollPivot)
| Set the horizontal roll pivot for film back roll.
double | horizontalRollPivot (MStatus *ReturnStatus=NULL) const
| Returns the current horizontal roll pivot value.
MStatus | setVerticalRollPivot (double verticalRollPivot)
| Set the vertical roll pivot for film back roll.
double | verticalRollPivot (MStatus *ReturnStatus=NULL) const
| Returns the vertical roll pivot's value.
MStatus | setFilmRollValue (double filmRollValue)
| Set the film roll value for film back.
double | filmRollValue (MStatus *ReturnStatus=NULL) const
| Returns the current roll value in radians.
MStatus | setFilmRollOrder (RollOrder filmRollOrder)
| Assign the order in which the film back rotation is applied with respect to the pivot point.
RollOrder | filmRollOrder (MStatus *ReturnStatus=NULL) const
| Returns the current roll order.
MStatus | setPreScale (double sf)
| Set the pre scale value.
double | preScale (MStatus *ReturnStatus=NULL) const
| Return the post projection matrix's pre-scale value.
MStatus | setPostScale (double sf)
| Set the post scale value.
double | postScale (MStatus *ReturnStatus=NULL) const
| Return the post projection matrix's post-scale value.
MStatus | setFilmTranslateH (double translate)
| Set the horizontal film translate.
double | filmTranslateH (MStatus *ReturnStatus=NULL) const
| Returns the horizontal film translate value.
MStatus | setFilmTranslateV (double translate)
| Set the vertical film translate.
double | filmTranslateV (MStatus *ReturnStatus=NULL) const
| Returns the vertical film translate value.
MFloatMatrix | postProjectionMatrix (MStatus *ReturnStatus=NULL) const
| Returns the post projection matrix used to compute film roll on the film back plane.
MFloatMatrix | postProjectionMatrix (MDGContext &context, MStatus *ReturnStatus=NULL) const
| Returns the post projection matrix used to compute film roll on the film back plane.
MStatus | setDisplayGateMask (bool displayGateMask)
| Activate shaded display of the film or resolution gate mask when looking through the camera.
MStatus | setDisplayFilmGate (bool displayFilmGate)
| Activate display of the film gate icons when looking through the camera.
bool | isDisplayFilmGate (MStatus *ReturnStatus=NULL) const
| Determines if the film gate icons are displayed when looking through the camera.
MStatus | setHorizontalFieldOfView (double fov)
| Sets the horizontal field of view for the camera.
double | horizontalFieldOfView (MStatus *ReturnStatus=NULL) const
| Returns the horizontal field of view for the camera.
MStatus | setVerticalFieldOfView (double fov)
| Sets the vertical field of view for the camera.
double | verticalFieldOfView (MStatus *ReturnStatus=NULL) const
| Returns the vertical field of view for the camera.
MStatus | setFocalLength (double focalLength)
| Sets the focal length for the camera.
double | focalLength (MStatus *ReturnStatus=NULL) const
| Returns the focal length for the camera.
MStatus | getFocalLengthLimits (double &min, double &max) const
| Returns the focal length limits for the camera.
MStatus | setLensSqueezeRatio (double lensSqueezeRatio)
| Set the squeeze ratio of the lens.
double | lensSqueezeRatio (MStatus *ReturnStatus=NULL) const
| Returns the lens squeeze ratio for the camera.
MStatus | setClippingPlanes (bool ClippingPlanes)
| Turn on/off manual setting of clip planes.
bool | isClippingPlanes (MStatus *ReturnStatus=NULL) const
| Determines whether manual clipping planes are activated.
MStatus | setNearClippingPlane (double dNear)
| Set the distances to the Near Clipping Plane.
double | nearClippingPlane (MStatus *ReturnStatus=NULL) const
| Returns the distance to the near clipping plane.
MStatus | setFarClippingPlane (double dFar)
| Set the distances to the Far Clipping Plane.
double | farClippingPlane (MStatus *ReturnStatus=NULL) const
| Returns the distance to the far clipping plane.
MStatus | setNearFarClippingPlanes (double dNear, double dFar)
| Set the distances to the Near and Far Clipping Planes.
MStatus | setDepthOfField (bool depthOfField)
| Specifies whether the depth of field calculation is performed for the camera.
bool | isDepthOfField (MStatus *ReturnStatus=NULL) const
| Determines whether the depth of field calculation is performed for the camera.
MStatus | setFStop (double fStop)
| Sets the f-stop value for the camera.
double | fStop (MStatus *ReturnStatus=NULL) const
| Returns the f-stop value for the camera.
MStatus | setFocusDistance (double distance)
| Set the focus at a certain distance in front of the camera.
double | focusDistance (MStatus *ReturnStatus=NULL) const
| Returns the focus distance for the camera.
MStatus | setNearFocusDistance (double nearFocusDistance)
| Set the nearest distance within the well-focus region.
double | nearFocusDistance (MStatus *ReturnStatus=NULL) const
| Returns the linear distance to the near focus plane.
MStatus | setFarFocusDistance (double farFocusDistance)
| Set the farthest distance within the well-focus region.
double | farFocusDistance (MStatus *ReturnStatus=NULL) const
| Returns the linear distance to the far focus plane.
MStatus | computeDepthOfField ()
MStatus | computeDepthOfField (double nearLimit)
MStatus | setMotionBlur (bool motionBlur)
| Turns motion blur on/off for the camera.
bool | isMotionBlur (MStatus *ReturnStatus=NULL) const
| Determine if motion blur is on/off for the camera.
MStatus | setShutterAngle (double shutterAngle)
| Change the current shutter angle which is one of the variables used to compute motion blur.
double | shutterAngle (MStatus *ReturnStatus=NULL) const
| Return the current shutter angle which is one of the variables used to compute motion blur.
MStatus | setCenterOfInterest (double dist)
| Set the Center of Interest, which is defined to be a positive distance along the View Direction (i.e., "in front" of the Camera).
double | centerOfInterest (MStatus *ReturnStatus=NULL) const
| Return the linear distance from the camera's eye point to the center of interest.
MStatus | setIsOrtho (bool orthoState)
| Switch the camera in and out of orthographic mode.
MStatus | setIsOrtho (bool orthoState, double useDist)
| Switch the camera in and out of orthographic mode.
bool | isOrtho (MStatus *ReturnStatus=NULL) const
| Determines if the camera is in orthographic mode.
MStatus | setOrthoWidth (double orthoWidth)
| Sets a new width for the ortho camera.
double | orthoWidth (MStatus *ReturnStatus=NULL) const
| Returns the orthographic projection width.
MStatus | setCameraScale (double scale)
| Sets the camera scale.
double | cameraScale (MStatus *ReturnStatus=NULL) const
| Returns the camera scale.
MStatus | setTumblePivot (const MPoint &point)
| The tumble pivot is used for non-local tumble operations.
MPoint | tumblePivot (MStatus *ReturnStatus=NULL) const
| Returns the tumble pivot value for the camera.
| MFnCamera (const MObject &object, MStatus *ret=NULL)
| Constructor.
MStatus | setStereo (bool stereo)
| Obsolete & no script support.
bool | isStereo (MStatus *ReturnStatus=NULL) const
| Obsolete & no script support.
MStatus | setParallelView (bool parallelView)
| obsolete & no script support
bool | isParallelView (MStatus *ReturnStatus=NULL) const
| obsolete & no script support
MStatus | setEyeOffset (double eyeOffset)
| Obsolete & no script support.
double | eyeOffset (MStatus *ReturnStatus=NULL) const
| Obsolete & no script support.
MStatus | getFilmFrustum (double distance, MPoint clipPlane[4], bool applyPanZoom=false) const
| No script support.
MStatus | setUsePivotAsLocalSpace (const bool how)
| Local space tumbling specifies that when the camera is tumbled, the camera will rotate about its local axis, offset by the tumblePivot.
bool | usePivotAsLocalSpace (MStatus *ReturnStatus=NULL) const
| Returns the value of the local axis tumble setting for this camera.
## Protected Member Functions
virtual const char * | className () const
| Class name. Search for all occurrences

## Member Enumeration Documentation

enum FilmFit

Search for all occurrences

Specifies how to fit the digital image to the film back.

This describes how the digital image (in pixels) relates to the film back. Since the film back is defined in terms of real numbers with some arbitrary film aspect, and the digital image is defined in integer pixels with an equally arbitrary (and different) resolution, relating the two can get complicated.

Enumerator:

  kFillFilmFit | The system calculates both horizontal and vertical fits and then applies the one that makes the digital image larger than the film back. Search for all occurrences
  kHorizontalFilmFit | The digital image is made to fit the film back exactly in the horizontal direction. This then gives each pixel a horizontal size = (film back width) / (horizontal resolution). The pixel height is then = (pixel width) / (pixel aspect ratio). Now that the pixel has a size, resolution gives us a complete image. That image will match the film back exactly in width. It will almost never match in height, either being too tall or too short. By playing with the numbers you can get it pretty close though. Search for all occurrences
  kVerticalFilmFit | The same idea as horizontal fit, only applied vertically. Thus the digital image will match the film back exactly in height, but miss in width. Search for all occurrences
  kOverscanFilmFit | Over-scanning the film gate in the camera view allows us to choreograph action outside of the frustum from within the camera view without having to resort to a dolly or zoom. This feature is also essential for animating image planes. Search for all occurrences
  kInvalid | Search for all occurrences

## Constructor & Destructor Documentation

~MFnCamera | ( |  | ) | `[virtual]`

Destructor.

Class destructor.

MFnCamera | ( | MObject & | object,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters:

  [in] | object | The MObject to attach the function set to
  [out] | ReturnStatus | the return status

Status Codes:
  - MS::kSuccess if the function set is successfully attached
  - MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

MFnCamera | ( | const MDagPath & | object,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Constructor.

Class constructor that initializes the function set to the given constant MDagPath object.

Parameters:

  [in] | object | The const MDagPath to attach the function set to
  [out] | ReturnStatus | The return status

Status Codes:
  - MS::kSuccess if the function set is successfully attached
  - MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

MFnCamera | ( | const MObject & | object,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters:

  [in] | object | The MObject to attach the function set to
  [out] | ReturnStatus | the return status

Status Codes:
  - MS::kSuccess if the function set is successfully attached
  - MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

## Member Function Documentation

MFn::Type type | ( |  | ) | const`[virtual]`

Search for all occurrences

Function set type.

Return the class type : MFn::kCamera.

Reimplemented from MFnDagNode.

MObject create | ( | MStatus * | ReturnStatus = `NULL` | ) |

Search for all occurrences

Creates a perspective camera and a transform to parent it.

The camera is positioned at (0, 0, 0), its center of interest at (0, 0, -1), which implies that the view-direction is pointing in the direction of the negative z-axis, and its up-direction along the positive Y axis.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The transform parenting the new camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kLicenseFailure Application not licensed for attempted operation
  - MS::kFailure An object error has occurred

MObject create | ( | MObject & | parent,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Creates a perspective camera.

A parent can be specified for the new camera, otherwise a transform is created.

The camera is positioned at (0, 0, 0), its center of interest at (0, 0, -1), which implies that the view-direction is pointing in the direction of the negative z-axis, and its up-direction along the positive Y axis.

Parameters:

  [in] | parent | The parent of the new camera
  [out] | ReturnStatus | Status code

Returns:
  The transform parenting the new camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kLicenseFailure Application not licensed for attempted operation
  - MS::kFailure An object error has occurred

MPoint eyePoint | ( | MSpace::Space | space = `MSpace::kObject`,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

Returns the eye point for the camera.

Parameters:

  [in] | space | Specifies the coordinate system for this operation
  [out] | ReturnStatus | Status code

Returns:
  The eye point location for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kInvalidParameter Cannot do world space transform.
  - MS::kFailure An object error has occurred

Examples:
  animInfoCmd.cpp.

MVector viewDirection | ( | MSpace::Space | space = `MSpace::kObject`,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

Returns the view direction for the camera.

Parameters:

  [in] | space | Specifies the coordinate system for this operation
  [out] | ReturnStatus | Status code

Returns:
  The view direction vector for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kInvalidParameter Cannot do world space transform.
  - MS::kFailure An object error has occurred

Examples:
  animInfoCmd.cpp.

MVector upDirection | ( | MSpace::Space | space = `MSpace::kObject`,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

Returns the up direction vector for the camera.

Parameters:

  [in] | space | Specifies the coordinate system for this operation
  [out] | ReturnStatus | Status code

Returns:
  The up direction vector for this camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kInvalidParameter Cannot do world space transform.
  - MS::kFailure An object error has occurred

Examples:
  animInfoCmd.cpp.

MVector rightDirection | ( | MSpace::Space | space = `MSpace::kObject`,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

Returns the right direction vector for the camera.

Parameters:

  [in] | space | Specifies the coordinate system for this operation
  [out] | ReturnStatus | Status code

Returns:
  The right direction vector for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kInvalidParameter Cannot do world space transform.
  - MS::kFailure An object error has occurred

Examples:
  animInfoCmd.cpp.

MPoint centerOfInterestPoint | ( | MSpace::Space | space = `MSpace::kObject`,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

Returns the center of interest point for the camera.

Parameters:

  [in] | space | Specifies the coordinate system for this operation
  [out] | ReturnStatus | Status code

Returns:
  The center of interest location of the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kInvalidParameter Cannot do world space transform.
  - MS::kFailure An object error has occurred

Examples:
  animInfoCmd.cpp.

MStatus set | ( | const MPoint & | wsEyeLocation,
|  | const MVector & | wsViewDirection,
|  | const MVector & | wsUpDirection,
|  | double | horizFieldOfView,
|  | double | aspectRatio
| ) |  |

Search for all occurrences

Convenience routine to set the camera viewing parameters.

The specified values should be in world space where applicable.

This method will only work when the world space information for the camera is available, i.e. when the function set has been initialized with a DAG path.

Parameters:

  [in] | wsEyeLocation | Eye location to set in world space
  [in] | wsViewDirection | View direction to set in world space
  [in] | wsUpDirection | Up direction to set in world space
  [in] | horizFieldOfView | The horizontal field of view to set
  [in] | aspectRatio | The aspect ratio to set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setEyePoint | ( | const MPoint & | eyeLocation,
|  | MSpace::Space | space = `MSpace::kObject`
| ) |  |

Search for all occurrences

Positions the eye-point of the camera keeping the center of interest fixed in space.

This method changed the orientation and translation of the camera's transform attributes as well as the center-of-interest distance.

This method will only work when the world space information for the camera is available, i.e. when the function set has been initialized with a DAG path.

Parameters:

  [in] | eyeLocation | The eye location to set
  [in] | space | Specifies the coordinate system for this operation

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kInvalidParameter Cannot do world space transform.
  - MS::kFailure An object error has occurred

MStatus setCenterOfInterestPoint | ( | const MPoint & | centerOfInterest,
|  | MSpace::Space | space = `MSpace::kObject`
| ) |  |

Search for all occurrences

Positions the center-of-interest of the camera keeping the eye-point fixed in space.

This method changed the orientation and translation of the camera's transform attributes as well as the center-of-interest distance.

This method will only work when the world space information for the camera is available, i.e. when the function set has been initialized with a DAG path.

Parameters:

  [in] | centerOfInterest | Center of interest point to be set
  [in] | space | Specifies the coordinate system for this operation

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kInvalidParameter Cannot do world space transform.
  - MS::kFailure An object error has occurred

bool hasSamePerspective | ( | const MDagPath & | otherCamera,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Returns true if the camera has same perspective settings as the given camera.

This method will only work when the world space information for the camera is available, i.e. when the function set has been initialized with a DAG path.

Parameters:

  [in] | otherCamera | Camera to compare perspective with
  [out] | ReturnStatus | Status code

Returns:
  Boolean value: true Specified camera has same perspective as this camera, false otherwise.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus copyViewFrom | ( | const MDagPath & | otherCamera | ) |

Search for all occurrences

Copy the camera settings related to the perspective from the given camera view.

This method will only work when the world space information for the camera is available, i.e. when the function set has been initialized with a DAG path.

Parameters:

  [in] | otherCamera | Camera to copy view from

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus getFilmFrustum | ( | double | distance,
|  | MPointArray | clipPlanes,
|  | bool | applyPanZoom = `false`
| ) |  | const

Search for all occurrences

This method is not available in Python.

Returns the film frustum for the camera. The frustum defines the projective transformation.

- element 0 is the bottom left
- element 1 is the top left
- element 2 is the top right
- element 3 is the bottom right

Parameters:

  [in] | distance | Specifies the focal length
  [out] | clipPlanes | point array to store the clip planes
  [in] | applyPanZoom | specifies whether to apply 2D pan/zoom

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus getFilmFrustum | ( | double | distance,
|  | double & | hSize,
|  | double & | vSize,
|  | double & | hOffset,
|  | double & | vOffset,
|  | bool | applyPanZoom = `false`
| ) |  | const

Search for all occurrences

Returns the film frustum for the camera.

The frustum defines the projective transformation.

Parameters:

  [in] | distance | Specifies the focal length
  [out] | hSize | storage for horizontal size
  [out] | vSize | storage for vertical size
  [out] | hOffset | storage for horizontal offset
  [out] | vOffset | storage for vertical offset
  [in] | applyPanZoom | specifies whether to apply 2D pan/zoom

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus getPortFieldOfView | ( | int | width,
|  | int | height,
|  | double & | horizontalFOV,
|  | double & | verticalFOV
| ) |  | const

Search for all occurrences

Compute the horizontal and vertical field of view in radians from the given viewport width and height.

Parameters:

  [in] | width | width of viewport
  [in] | height | height of viewport
  [out] | horizontalFOV | storage for the horizonal field of view
  [out] | verticalFOV | storage for the vertical field of view

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus getViewParameters | ( | double | windowAspect,
|  | double & | apertureX,
|  | double & | apertureY,
|  | double & | offsetX,
|  | double & | offsetY,
|  | bool | applyOverscan = `false`,
|  | bool | applySqueeze = `false`,
|  | bool | applyPanZoom = `false`
| ) |  | const

Search for all occurrences

Computes and returns the intermediate viewing frustum parameters for the camera.

The aperture and offset are used by getViewingFrustrum() and getRenderingFrustrum() to compute the extent (left, right, top, bottom) of the frustrum in the following manner:

- left = focal_to_near * (-0.5*apertureX + offsetX)
- right = focal_to_near * (0.5*apertureX + offsetX)
- bottom = focal_to_near * (-0.5*apertureY + offsetY)
- top = focal_to_near * (0.5*apertureY + offsetY)

Here, focal_to_near is equal to cameraScale() if the camera is orthographic, or it is equal to ((nearClippingPlane() / (focalLength() * MM_TO_INCH)) * cameraScale()) where MM_TO_INCH equals 0.03937.

Parameters:

  [in] | windowAspect | windowAspect
  [out] | apertureX | storage for the horizontal aperture
  [out] | apertureY | storage for the vertical aperture
  [out] | offsetX | storage for the horizontal offset
  [out] | offsetY | storage for the vertical offset
  [in] | applyOverscan | specifies whether to apply overscan
  [in] | applySqueeze | specifies whether to apply the lens squeeze ratio of the camera
  [in] | applyPanZoom | specifies whether to apply 2D pan/zoom

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus getViewingFrustum | ( | double | windowAspect,
|  | double & | left,
|  | double & | right,
|  | double & | bottom,
|  | double & | top,
|  | bool | applyOverscan = `false`,
|  | bool | applySqueeze = `false`,
|  | bool | applyPanZoom = `false`
| ) |  | const

Search for all occurrences

Computes and returns the viewing frustum for the camera.

Parameters:

  [in] | windowAspect | windowAspect
  [out] | left | storage for the left side of frustum
  [out] | right | storage for the right side of frustum
  [out] | bottom | storage for the bottom of frustum
  [out] | top | storage for the top of frustum
  [in] | applyOverscan | specifies whether to apply overscan
  [in] | applySqueeze | specifies whether to apply the lens squeeze ratio of the camera
  [in] | applyPanZoom | specifies whether to apply 2D pan/zoom

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus getRenderingFrustum | ( | double | windowAspect,
|  | double & | left,
|  | double & | right,
|  | double & | bottom,
|  | double & | top
| ) |  | const

Search for all occurrences

Computes and returns the rendering frustum for the camera.

This is the frustum that the maya renderer uses.

Parameters:

  [in] | windowAspect | windowAspect
  [out] | left | storage for the left side of frustum
  [out] | right | storage for the right side of frustum
  [out] | bottom | storage for the bottom of frustum
  [out] | top | storage for the top of frustum

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MFloatMatrix projectionMatrix | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the orthographic or perspective projection matrix for the camera.

The projection matrix that maya's software renderer uses is almost identical to the OpenGL projection matrix. The difference is that maya uses a left hand coordinate system and so the entries [2][2] and [3][2] are negated.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The projection matrix

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

Examples:
  animInfoCmd.cpp.

MFloatMatrix projectionMatrix | ( | MDGContext & | context,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

Returns the orthographic or perspective projection matrix for the camera.

The projection matrix that maya's software renderer uses is almost identical to the OpenGL projection matrix. The difference is that maya uses a left hand coordinate system and so the entries [2][2] and [3][2] are negated.

Parameters:

  [in] | context | DG time-context to specify time of evaluation.
  [out] | ReturnStatus | Status code

Returns:
  The projection matrix

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setHorizontalFilmAperture | ( | double | hFilmAperture | ) |

Search for all occurrences

Change the horizontal size of the camera aperture.

Unit used is inches.

Parameters:

  [in] | hFilmAperture | Horizontal file aperture value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double horizontalFilmAperture | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the horizontal film aperture for the camera.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The horizontal film aperture for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setVerticalFilmAperture | ( | double | vFilmAperture | ) |

Search for all occurrences

Change the vertical size of the camera aperture.

Unit used is inches.

Parameters:

  [in] | vFilmAperture | The vertical film aperture for the camera

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double verticalFilmAperture | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the vertical film aperture for the camera.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The vertical film aperture for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus getFilmApertureLimits | ( | double & | min,
|  | double & | max
| ) |  | const

Search for all occurrences

Returns the maximum and minimum film aperture limits for the camera.

Parameters:

  [out] | min | Storage for the minimum film aperture limit
  [out] | max | Storage for the maximum film aperture limit

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setAspectRatio | ( | double | aspectRatio | ) |

Search for all occurrences

Set the aspect ratio of the View.

The aspect ratio is expressed as width/height. This also modifies the entity's scale transformation to reflect the new aspect ratio.

Parameters:

  [in] | aspectRatio | The aspect ratio to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double aspectRatio | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the aspect ratio for the camera.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The aspect ratio

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

Examples:
  animInfoCmd.cpp.

MStatus getAspectRatioLimits | ( | double & | min,
|  | double & | max
| ) |  | const

Search for all occurrences

Returns the minimum and maximum aspect ratio limits for the camera.

Parameters:

  [out] | min | Storage for the minimum aspect ratio limit
  [out] | max | Storage for the maximum aspect ratio limit

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setVerticalLock | ( | bool | lockFlag | ) |

Search for all occurrences

Sets the vertical lock to on or off for the camera.

Parameters:

  [in] | lockFlag | Vertical lock value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

bool isVerticalLock | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Determines if vertical lock is turned on for the camera.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  Boolean value: true Vertical lock is on, false otherwise.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double horizontalFilmOffset | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the horizontal offset of the film.

Unit used is inches.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The horizontal film offset for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setHorizontalFilmOffset | ( | double | hOffset | ) |

Search for all occurrences

Change the horizontal offset of the film.

Unit used is inches.

Parameters:

  [in] | hOffset | The horizontal film offset value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double verticalFilmOffset | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Change the vertical offset of the film.

Unit used is inches.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The vertical film offset for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setVerticalFilmOffset | ( | double | vOffset | ) |

Search for all occurrences

Change the vertical offset of the film.

Unit used is inches.

Parameters:

  [in] | vOffset | The vertical film offset value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

bool shakeEnabled | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the toggle value for the camera shake enabled attribute.

If this attribute is false, the horizontalShake and verticalShake values are ignored by the camera.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The horizontal film-based camera shake toggle value for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setShakeEnabled | ( | bool | enabled | ) |

Search for all occurrences

Changes the toggle value for the camera shake enabled attribute.

If this attribute is false, the horizontalShake and verticalShake values are ignored by the camera.

Parameters:

  [in] | enabled | The film-based camera shake toggle value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double horizontalShake | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the horizontal offset of the film due to the shake attribute.

Unit used is inches. This horizontal/vertical attribute pair acts identically to the film offset pair, but gives another point of input to that system. This allows film-based camera shake to be accessed conveniently and independently without disturbing any other film-offsetting techniques.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The horizontal film-based camera shake offset for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setHorizontalShake | ( | double | hOffset | ) |

Search for all occurrences

Change the horizontal film-based camera shake value.

Unit used is inches.

Parameters:

  [in] | hOffset | The horizontal film-based camera shake value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double verticalShake | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Change the vertical film-based camera shake value.

Unit used is inches. This horizontal/vertical attribute pair acts identically to the film offset pair, but gives another point of input to that system. This allows film-based camera shake to be accessed conveniently and independently without disturbing any other film-offsetting techniques.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The vertical film-based camera shake value for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setVerticalShake | ( | double | vOffset | ) |

Search for all occurrences

Changes the vertical film-based camera shake value.

Unit used is inches.

Parameters:

  [in] | vOffset | The vertical film-based camera shake value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

bool shakeOverscanEnabled | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the toggle value for the camera shake overscan attribute.

If this attribute is false, the shakeOverscan value is ignored by the camera.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The camera shake overscan toggle value for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setShakeOverscanEnabled | ( | bool | enabled | ) |

Search for all occurrences

Changes the toggle value for the camera shake overscan enabled attribute.

If this attribute is false, the shakeOverscan value is ignored by the camera.

Parameters:

  [in] | enabled | The film-based camera shake overscan toggle value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double shakeOverscan | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the camera shake overscan value.

Unit is a multiplier to the film aperture. This overscan is used to render a larger area than would be necessary if the camera were not shaking. This attribute will affect the output render.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The film-based camera shake overscan value for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setShakeOverscan | ( | double | overscan | ) |

Search for all occurrences

Changes the camera shake overscan value.

Unit is a multiplier to the film aperture size. This attribute will affect the output render.

Parameters:

  [in] | overscan | The camera shake overscan value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

bool panZoomEnabled | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Return the toggle value for the camera 2D pan/zoom enabled attribute.

If this attribute is false, the 2D pan/zoom values are ignored by the camera.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The camera 2D pan/zoom toggle value for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setPanZoomEnabled | ( | bool | enabled | ) |

Search for all occurrences

Changes the toggle value for the camera 2D pan/zoom enabled attribute.

Parameters:

  [in] | enabled | The camera 2D pan/zoom enabled toggle value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

bool renderPanZoom | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Return the toggle value for the camera render 2D pan/zoom attribute.

If this attribute is false, the 2D pan/zoom values will not affect the output render.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The camera render 2D pan/zoom toggle value

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setRenderPanZoom | ( | bool | render | ) |

Search for all occurrences

Changes the toggle value for the camera render 2D pan/zoom enabled attribute.

Parameters:

  [in] | render | The camera render 2D pan/zoom toggle value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double horizontalPan | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Return the camera 2D horizontal pan value.

Unit is inches.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The camera 2D horizontal pan value

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setHorizontalPan | ( | double | hPan | ) |

Search for all occurrences

Changes the camera 2D horizontal pan value.

Unit is inches.

Parameters:

  [in] | hPan | The camera 2D horizontal pan value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double verticalPan | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Return the camera 2D vertical pan value.

Unit is inches.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The camera 2D vertical pan value

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setVerticalPan | ( | double | vPan | ) |

Search for all occurrences

Changes the camera 2D vertical pan value.

Unit is inches.

Parameters:

  [in] | vPan | The camera 2D vertical pan value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double zoom | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Return the camera 2D zoom value, which is the percent over the film viewable frustum to display.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The camera 2D zoom value

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setZoom | ( | double | zoom | ) |

Search for all occurrences

Changes the camera 2D zoom value.

Parameters:

  [in] | zoom | The camera 2D zoom value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

bool stereoHITEnabled | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the toggle value for the stereo HIT enabled attribute.

If this attribute is false, the stereoHIT value is ignored by the camera.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The camera stereo HIT toggle value for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setStereoHITEnabled | ( | bool | enabled | ) |

Search for all occurrences

Changes the toggle value for the stereo HIT enabled attribute.

If this attribute is false, the stereoHIT value is ignored by the camera.

Parameters:

  [in] | enabled | The film-based camera stereo HIT toggle value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double stereoHIT | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the camera stereo horizontal image translation (stereo HIT) value.

Unit is inches. This has the same effect as the HFO attribute, but is intended as an input hook for use with stereo camera rigs.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The stereo HIT value for this camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setStereoHIT | ( | double | hit | ) |

Search for all occurrences

Changes the camera stereo horizontal image translation (stereo HIT) value.

Unit is inches. This has the same effect as the HFO attribute, but is intended as an input hook for use with stereo camera rigs.

Parameters:

  [in] | hit | The stereo HIT value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setFilmFit | ( | FilmFit | filmFit | ) |

Search for all occurrences

Sets how the digital image is to be fitted to the film back.

Parameters:

  [in] | filmFit | The type of film fit

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MFnCamera::FilmFit filmFit | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns how the digital image is being fitted to the film back.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The type of film fit.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setFilmFitOffset | ( | double | filmFitOffset | ) |

Search for all occurrences

Set the film fit offset for the camera.

Since the digital image may not match the film back exactly, we now have the question of how to position one relative to the other. Thus fit offset. Normally the centers are aligned. Fit offset lets you move the smaller image within the larger one. Specify the distance for film offset (inches).

Parameters:

  [in] | filmFitOffset |

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double filmFitOffset | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the film fit offset for the camera.

Since the digital image may not match the film back exactly, we now have the question of how to position one relative to the other. Thus fit offset. Normally the centers are aligned. Fit offset lets you move the smaller image within the larger one. Specify the distance for film offset (inches).

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The film fit offset as double.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setOverscan | ( | double | overscan | ) |

Search for all occurrences

Set the percent of overscan for this camera.

Parameters:

  [in] | overscan |

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double overscan | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the percent of overscan for this camera.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The percent of overscan

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setHorizontalRollPivot | ( | double | horizontalRollPivot | ) |

Search for all occurrences

Set the horizontal roll pivot for film back roll.

Parameters:

  [in] | horizontalRollPivot | Specifies the horizontal pivot value.

Returns:
  Status Code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double horizontalRollPivot | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the current horizontal roll pivot value.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The horizontal roll pivot value.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setVerticalRollPivot | ( | double | verticalRollPivot | ) |

Search for all occurrences

Set the vertical roll pivot for film back roll.

Parameters:

  [in] | verticalRollPivot | Specifies the vertical pivot value.

Returns:
  Status Code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double verticalRollPivot | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the vertical roll pivot's value.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  Vertical roll pivot

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setFilmRollValue | ( | double | filmRollValue | ) |

Search for all occurrences

Set the film roll value for film back.

Parameters:

  [in] | filmRollValue | Specifies the amount rotation in the film back. The film back rotation value is specified in radians.

Returns:
  Status Code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double filmRollValue | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the current roll value in radians.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  Roll value in radians.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setFilmRollOrder | ( | RollOrder | filmRollOrder | ) |

Search for all occurrences

Assign the order in which the film back rotation is applied with respect to the pivot point.

There are 2 choices.

- kRotateTranslate The film back is first rotated before it is translated by the pivot value.
- kTranslateRotate The film back is translated by the pivot before it is rotated.

Parameters:

  [in] | filmRollOrder | The order to apply the film roll.

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MFnCamera::RollOrder filmRollOrder | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the current roll order.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The roll order

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setPreScale | ( | double | sf | ) |

Search for all occurrences

Set the pre scale value.

Parameters:

  [in] | sf | The scaling factor.

Returns:
  Status Code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double preScale | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Return the post projection matrix's pre-scale value.

Parameters:

  [out] | ReturnStatus | Status code.

Returns:
  Pre scale value.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setPostScale | ( | double | sf | ) |

Search for all occurrences

Set the post scale value.

Parameters:

  [in] | sf | The scaling factor.

Returns:
  Status Code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double postScale | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Return the post projection matrix's post-scale value.

Parameters:

  [out] | ReturnStatus | Status code.

Returns:
  Post scale value.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setFilmTranslateH | ( | double | translate | ) |

Search for all occurrences

Set the horizontal film translate.

Parameters:

  [in] | translate | The amount of translation normalized to the viewing area.

Returns:
  Status Code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double filmTranslateH | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the horizontal film translate value.

This value corresponds to the normalized viewport.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The horizontal translation amount.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setFilmTranslateV | ( | double | translate | ) |

Search for all occurrences

Set the vertical film translate.

Parameters:

  [in] | translate | The amount of translation normalized to the viewing area.

Returns:
  Status Code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double filmTranslateV | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the vertical film translate value.

This value corresponds to the normalized viewport, [-1,1].

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The vertical film translation.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MFloatMatrix postProjectionMatrix | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the post projection matrix used to compute film roll on the film back plane.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The film roll matrix.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MFloatMatrix postProjectionMatrix | ( | MDGContext & | context,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

Returns the post projection matrix used to compute film roll on the film back plane.

Parameters:

  [in] | context | DG time-context to specify time of evaluation
  [out] | ReturnStatus | Status code

Returns:
  The film roll matrix.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setDisplayGateMask | ( | bool | displayGateMask | ) |

Search for all occurrences

Activate shaded display of the film or resolution gate mask when looking through the camera.

Does not activate the film or resolution gate display.

Parameters:

  [in] | displayGateMask | Specifies whether to display the film gate shaded.

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setDisplayFilmGate | ( | bool | displayFilmGate | ) |

Search for all occurrences

Activate display of the film gate icons when looking through the camera.

Parameters:

  [in] | displayFilmGate | Specifies whether to display the film gate.

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

bool isDisplayFilmGate | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Determines if the film gate icons are displayed when looking through the camera.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  Boolean value: true The film gate is displayed, false otherwise.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setHorizontalFieldOfView | ( | double | fov | ) |

Search for all occurrences

Sets the horizontal field of view for the camera.

Parameters:

  [in] | fov | The horizontal field of view value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double horizontalFieldOfView | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the horizontal field of view for the camera.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The horizontal field of view for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setVerticalFieldOfView | ( | double | fov | ) |

Search for all occurrences

Sets the vertical field of view for the camera.

Parameters:

  [in] | fov | The vertical field of view value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double verticalFieldOfView | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the vertical field of view for the camera.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The vertical field of view for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setFocalLength | ( | double | focalLength | ) |

Search for all occurrences

Sets the focal length for the camera.

This is the distance along the lens axis between the lens and the film plane when "focal distance" is infinitely large. This is an optical property of the lens. This double precision parameter is always specified in millimeters.

Parameters:

  [in] | focalLength | The focal length value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double focalLength | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the focal length for the camera.

This is the distance along the lens axis between the lens and the film plane when "focal distance" is infinitely large. This is an optical property of the lens. This double precision parameter is always specified in millimeters.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The focal length for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

Examples:
  animInfoCmd.cpp.

MStatus getFocalLengthLimits | ( | double & | min,
|  | double & | max
| ) |  | const

Search for all occurrences

Returns the focal length limits for the camera.

Parameters:

  [out] | min | Storage for the minimum focal length limit
  [out] | max | Storage for the maximum focal length limit

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setLensSqueezeRatio | ( | double | aspectRatio | ) |

Search for all occurrences

Set the squeeze ratio of the lens.

The aspect ratio is expressed as width/height.

Parameters:

  [in] | aspectRatio | The lens squeeze ratio to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double lensSqueezeRatio | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the lens squeeze ratio for the camera.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The lens squeeze ratio for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setClippingPlanes | ( | bool | ClippingPlanes | ) |

Search for all occurrences

Turn on/off manual setting of clip planes.

Parameters:

  [in] | ClippingPlanes |

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

bool isClippingPlanes | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Determines whether manual clipping planes are activated.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  Boolean value: true manual clipping planes are activated, false otherwise.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setNearClippingPlane | ( | double | dNear | ) |

Search for all occurrences

Set the distances to the Near Clipping Plane.

Parameters:

  [in] | dNear | The near clipping plane value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double nearClippingPlane | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the distance to the near clipping plane.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The near clipping plane value for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setFarClippingPlane | ( | double | dFar | ) |

Search for all occurrences

Set the distances to the Far Clipping Plane.

Parameters:

  [in] | dFar | The far clipping plane value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double farClippingPlane | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the distance to the far clipping plane.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The far clipping plane value for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setNearFarClippingPlanes | ( | double | dNear,
|  | double | dFar
| ) |  |

Search for all occurrences

Set the distances to the Near and Far Clipping Planes.

Parameters:

  [in] | dNear | The near clipping plane value to be set
  [in] | dFar | The far clipping plane value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setDepthOfField | ( | bool | depthOfField | ) |

Search for all occurrences

Specifies whether the depth of field calculation is performed for the camera.

The depth of field calculation is used to give varying focus depending on the distance of the objects.

Parameters:

  [in] | depthOfField | The depth of field value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

bool isDepthOfField | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Determines whether the depth of field calculation is performed for the camera.

The depth of field calculation is used to give varying focus depending on the distance of the objects.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  Boolean value: true Depth of field is on, false otherwise.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setFStop | ( | double | fStop | ) |

Search for all occurrences

Sets the f-stop value for the camera.

A real lens normally contains a diaphragm or other stop which blocks some of the light that would otherwise pass through it. This stop is usually approximately round, and its diameter as seen from the front of the lens is called the lens diameter. The lens diameter is often described by its relation to the focal length of the lens. A lens whose diameter is one-eighth its local length is said to have an F-stop of 8. This is an optical property of the lens.

Parameters:

  [in] | fStop | The F/Stop value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double fStop | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the f-stop value for the camera.

A real lens normally contains a diaphragm or other stop which blocks some of the light that would otherwise pass through it. This stop is usually approximately round, and its diameter as seen from the front of the lens is called the lens diameter. The lens diameter is often described by its relation to the focal length of the lens. A lens whose diameter is one-eighth its local length is said to have an F-stop of 8. This is an optical property of the lens.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The F/Stop value for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

Examples:
  animInfoCmd.cpp.

MStatus setFocusDistance | ( | double | distance | ) |

Search for all occurrences

Set the focus at a certain distance in front of the camera.

Parameters:

  [in] | distance | The focus distance to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double focusDistance | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the focus distance for the camera.

This value sets the focus at a certain distance in front of the camera.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The focus distance for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

Examples:
  animInfoCmd.cpp.

MStatus setNearFocusDistance | ( | double | nearFocusDistance | ) |

Search for all occurrences

Set the nearest distance within the well-focus region.

Parameters:

  [in] | nearFocusDistance | The near focus distance value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double nearFocusDistance | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the linear distance to the near focus plane.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The near focus distance for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

Examples:
  animInfoCmd.cpp.

MStatus setFarFocusDistance | ( | double | farFocusDistance | ) |

Search for all occurrences

Set the farthest distance within the well-focus region.

Parameters:

  [in] | farFocusDistance | The far focus distance value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double farFocusDistance | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the linear distance to the far focus plane.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The far focus distance for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

Examples:
  animInfoCmd.cpp.

MStatus computeDepthOfField | ( |  | ) |

Search for all occurrences

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus computeDepthOfField | ( | double | nearLimit | ) |

Search for all occurrences

Parameters:

  [in] | nearLimit |

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setMotionBlur | ( | bool | motionBlur | ) |

Search for all occurrences

Turns motion blur on/off for the camera.

Motion blur determines whether the camera's image is motion blurred (as opposed to an object's image). For example, if you want to blur the camera movement when you are performing a fly-by.

Parameters:

  [in] | motionBlur | true turns motion blur on, false turns it off.

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

bool isMotionBlur | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Determine if motion blur is on/off for the camera.

Motion blur determines whether the camera's image is motion blurred (as opposed to an object's image). For example, if you want to blur the camera movement when you are performing a fly-by.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  Boolean value: true Motion blur is on, false otherwise.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setShutterAngle | ( | double | shutterAngle | ) |

Search for all occurrences

Change the current shutter angle which is one of the variables used to compute motion blur.

The shutterAngle is specified in radians.

Valid shutter angles must be in the range 1.0 (degrees) to 359.0 (degrees), and must be given in radians. Note: PI radians = 180 degrees.

Parameters:

  [in] | shutterAngle | The shutter angle value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double shutterAngle | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Return the current shutter angle which is one of the variables used to compute motion blur.

The shutter angle is specified in radians.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The shutter angle for the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setCenterOfInterest | ( | double | dist | ) |

Search for all occurrences

Set the Center of Interest, which is defined to be a positive distance along the View Direction (i.e., "in front" of the Camera).

Parameters:

  [in] | dist | center of interest distance value

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double centerOfInterest | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Return the linear distance from the camera's eye point to the center of interest.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  center of interest distance value

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setIsOrtho | ( | bool | orthoState | ) |

Search for all occurrences

Switch the camera in and out of orthographic mode.

This does not change the preset fov or the ortho width, presuming that these values are going to be set at the same time separately.

Parameters:

  [in] | orthoState | If true then the camera will be orthographic

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setIsOrtho | ( | bool | orthoState,
|  | double | useDist
| ) |  |

Search for all occurrences

Switch the camera in and out of orthographic mode.

When the switch happens, the camera has to calculate a new fov or ortho width, each of which is based on the other and a set distance. The caller can specify the distance; otherwise the center of interest is used.

Parameters:

  [in] | orthoState | If true then the camera will be orthographic
  [in] | useDist |

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

bool isOrtho | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Determines if the camera is in orthographic mode.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  Boolean value: true The camera is orthographic, false otherwise.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setOrthoWidth | ( | double | orthoWidth | ) |

Search for all occurrences

Sets a new width for the ortho camera.

Bad values are ignored.

Parameters:

  [in] | orthoWidth | The ortho width value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double orthoWidth | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the orthographic projection width.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The orthographic width

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setCameraScale | ( | double | scale | ) |

Search for all occurrences

Sets the camera scale.

Parameters:

  [in] | scale | The camera scale value to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

double cameraScale | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the camera scale.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The scale value of the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setTumblePivot | ( | const MPoint & | point | ) |

Search for all occurrences

The tumble pivot is used for non-local tumble operations.

It is in world space for "tumble pivot" mode and relative space for "local axis" mode (see setUsePivotAsLocalSpace).

Note that when camera is told to look at an object and the camera's usePivotAsLocalSpace() is false, the tumble pivot value for the camera is reset to the centre of the bounding box for the object being looked at.

Parameters:

  [in] | point | The tumble pivot location to be set

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MPoint tumblePivot | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the tumble pivot value for the camera.

The pivot value will be in world space coordinates unless usePivotAsLocalSpace() is true in which case the pivot is a relative offset.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  The tumble pivot location of the camera

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setStereo | ( | bool | stereo | ) |

Search for all occurrences

Obsolete & no script support.

This method is obsolete. This method is not available in Python.

Deprecated:
  This is an obsolete method, only kept for backward compatibility reasons.

It does not do anything.

Parameters:

  [in] | stereo | Unused.

Returns:
  MS::kSuccess

bool isStereo | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Obsolete & no script support.

This method is obsolete. This method is not available in Python.

Deprecated:
  This is an obsolete method, only kept for backward compatibility reasons.

It does not do anything.

Parameters:

  [out] | ReturnStatus | Status code. Will be set to MS::kSuccess.

Returns:
  false

MStatus setParallelView | ( | bool | parallelView | ) |

Search for all occurrences

obsolete & no script support

This method is obsolete. This method is not available in Python.

This is an obsolete method, only kept for backward compatibility reasons. It does not do anything.

Parameters:

  [in] | parallelView | Unused.

Status Codes:
  MS::kSuccess

bool isParallelView | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

obsolete & no script support

This method is obsolete. This method is not available in Python.

Deprecated:
  This is an obsolete method, only kept for backward compatibility reasons.

It does not do anything.

Parameters:

  [out] | ReturnStatus | Status code. Will be set to MS::kSuccess.

Returns:
  false

MStatus setEyeOffset | ( | double | eyeOffset | ) |

Search for all occurrences

Obsolete & no script support.

This method is obsolete. This method is not available in Python.

Deprecated:
  This is an obsolete method, only kept for backward compatibility reasons.

It does not do anything.

Parameters:

  [in] | eyeOffset | Unused.

Returns:
  MS::kSuccess

double eyeOffset | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Obsolete & no script support.

This method is obsolete. This method is not available in Python.

Deprecated:
  This is an obsolete method, only kept for backward compatibility reasons.

It does not do anything.

Parameters:

  [out] | ReturnStatus | Status code. Will be set to MS::kSuccess.

Returns:
  0.0

MStatus getFilmFrustum | ( | double | distance,
|  | MPoint | clipPlane[4],
|  | bool | applyPanZoom = `false`
| ) |  | const

Search for all occurrences

No script support.

Returns the film frustum for the camera.

The frustum defines the projective transformation.

- clipPlane[0] is the bottom left
- clipPlane[1] is the top left
- clipPlane[2] is the top right
- clipPlane[3] is the bottom right

Parameters:

  [in] | distance | Specifies the focal length
  [out] | clipPlane | Storage for the film frustum (allocated by user)
  [in] | applyPanZoom | specifies whether to apply 2D pan/zoom

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MStatus setUsePivotAsLocalSpace | ( | const bool | how | ) |

Search for all occurrences

Local space tumbling specifies that when the camera is tumbled, the camera will rotate about its local axis, offset by the tumblePivot.

The effect is like that of tilting the camera on a tripod. This per-camera setting overrides whatever tumble mode is defined globally in Maya.

For an example of local space tumbling, if `how' is true and this camera's tumblePivot value is (0,1,0) then when tumbled the camera will rotate about a point one unit in Y away from the camera's local axis.

Parameters:

  [in] | how | True to use local space tumbling for this camera, or false to use the current global tumble setting in Maya (the global tumble setting can be set via the Tumble Tool Option Box). The default value is false.

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

bool usePivotAsLocalSpace | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the value of the local axis tumble setting for this camera.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  True if using local space tumbling for this camera, or false if using the current global tumble setting in Maya. See setUsePivotAsLocalSpace() for more details.

Status Codes:
  - MS::kSuccess The method was successful
  - MS::kFailure An object error has occurred

MFnCamera MFnCamera MFnCamera MFnCamera MFnCamera MFnCamera MFnCamera MFnCamera MFnCamera MFnCamera
MFnCamera MFnCamera MFnCamera MFnCamera MFnCamera MFnCamera MFnCamera MFnCamera MFnCamera MFnCamera