#include
<MFnCamera.h>
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.
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) |
MObject | create (MObject &parent, MStatus *ReturnStatus=NULL) |
MPoint | eyePoint (MSpace::Space space=MSpace::kObject, MStatus *ReturnStatus=NULL) const |
MVector | viewDirection (MSpace::Space space=MSpace::kObject, MStatus *ReturnStatus=NULL) const |
MVector | upDirection (MSpace::Space space=MSpace::kObject, MStatus *ReturnStatus=NULL) const |
MVector | rightDirection (MSpace::Space space=MSpace::kObject, MStatus *ReturnStatus=NULL) const |
MPoint | centerOfInterestPoint (MSpace::Space space=MSpace::kObject, MStatus *ReturnStatus=NULL) const |
MStatus | set (const MPoint &wsEyeLocation, const MVector &wsViewDirection, const MVector &wsUpDirection, double horizFieldOfView, double aspectRatio) |
MStatus | setEyePoint (const MPoint &eyeLocation, MSpace::Space space=MSpace::kObject) |
MStatus | setCenterOfInterestPoint (const MPoint ¢erOfInterest, MSpace::Space space=MSpace::kObject) |
bool | hasSamePerspective (const MDagPath &otherCamera, MStatus *ReturnStatus=NULL) |
MStatus | copyViewFrom (const MDagPath &otherCamera) |
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 |
MStatus | getPortFieldOfView (int width, int height, double &horizontalFOV, double &verticalFOV) const |
MStatus | getViewParameters (double windowAspect, double &apertureX, double &apertureY, double &offsetX, double &offsetY, bool applyOverscan=false, bool applySqueeze=false, bool applyPanZoom=false) const |
MStatus | getViewingFrustum (double windowAspect, double &left, double &right, double &bottom, double &top, bool applyOverscan=false, bool applySqueeze=false, bool applyPanZoom=false) const |
MStatus | getRenderingFrustum (double windowAspect, double &left, double &right, double &bottom, double &top) const |
MFloatMatrix | projectionMatrix (MStatus *ReturnStatus=NULL) const |
MFloatMatrix | projectionMatrix (MDGContext &context, MStatus *ReturnStatus=NULL) const |
MStatus | setHorizontalFilmAperture (double hFilmAperture) |
double | horizontalFilmAperture (MStatus *ReturnStatus=NULL) const |
MStatus | setVerticalFilmAperture (double vFilmAperture) |
double | verticalFilmAperture (MStatus *ReturnStatus=NULL) const |
MStatus | getFilmApertureLimits (double &min, double &max) const |
MStatus | setAspectRatio (double aspectRatio) |
double | aspectRatio (MStatus *ReturnStatus=NULL) const |
MStatus | getAspectRatioLimits (double &min, double &max) const |
MStatus | setVerticalLock (bool lockFlag) |
bool | isVerticalLock (MStatus *ReturnStatus=NULL) const |
double | horizontalFilmOffset (MStatus *ReturnStatus=NULL) const |
MStatus | setHorizontalFilmOffset (double hOffset) |
double | verticalFilmOffset (MStatus *ReturnStatus=NULL) const |
MStatus | setVerticalFilmOffset (double vOffset) |
bool | shakeEnabled (MStatus *ReturnStatus=NULL) const |
MStatus | setShakeEnabled (bool enabled) |
double | horizontalShake (MStatus *ReturnStatus=NULL) const |
MStatus | setHorizontalShake (double hOffset) |
double | verticalShake (MStatus *ReturnStatus=NULL) const |
MStatus | setVerticalShake (double vOffset) |
bool | shakeOverscanEnabled (MStatus *ReturnStatus=NULL) const |
MStatus | setShakeOverscanEnabled (bool enabled) |
double | shakeOverscan (MStatus *ReturnStatus=NULL) const |
MStatus | setShakeOverscan (double vOffset) |
bool | panZoomEnabled (MStatus *ReturnStatus=NULL) const |
MStatus | setPanZoomEnabled (bool enabled) |
bool | renderPanZoom (MStatus *ReturnStatus=NULL) const |
MStatus | setRenderPanZoom (bool render) |
double | horizontalPan (MStatus *ReturnStatus=NULL) const |
MStatus | setHorizontalPan (double hPan) |
double | verticalPan (MStatus *ReturnStatus=NULL) const |
MStatus | setVerticalPan (double vPan) |
double | zoom (MStatus *ReturnStatus=NULL) const |
MStatus | setZoom (double zoom) |
bool | stereoHITEnabled (MStatus *ReturnStatus=NULL) const |
MStatus | setStereoHITEnabled (bool enabled) |
double | stereoHIT (MStatus *ReturnStatus=NULL) const |
MStatus | setStereoHIT (double vOffset) |
MStatus | setFilmFit (FilmFit filmFit) |
FilmFit | filmFit (MStatus *ReturnStatus=NULL) const |
MStatus | setFilmFitOffset (double filmFitOffset) |
double | filmFitOffset (MStatus *ReturnStatus=NULL) const |
MStatus | setOverscan (double overscan) |
double | overscan (MStatus *ReturnStatus=NULL) const |
MStatus | setHorizontalRollPivot (double horizontalRollPivot) |
double | horizontalRollPivot (MStatus *ReturnStatus=NULL) const |
MStatus | setVerticalRollPivot (double verticalRollPivot) |
double | verticalRollPivot (MStatus *ReturnStatus=NULL) const |
MStatus | setFilmRollValue (double filmRollValue) |
double | filmRollValue (MStatus *ReturnStatus=NULL) const |
MStatus | setFilmRollOrder (RollOrder filmRollOrder) |
RollOrder | filmRollOrder (MStatus *ReturnStatus=NULL) const |
MStatus | setPreScale (double sf) |
double | preScale (MStatus *ReturnStatus=NULL) const |
MStatus | setPostScale (double sf) |
double | postScale (MStatus *ReturnStatus=NULL) const |
MStatus | setFilmTranslateH (double translate) |
double | filmTranslateH (MStatus *ReturnStatus=NULL) const |
MStatus | setFilmTranslateV (double translate) |
double | filmTranslateV (MStatus *ReturnStatus=NULL) const |
MFloatMatrix | postProjectionMatrix (MStatus *ReturnStatus=NULL) const |
MFloatMatrix | postProjectionMatrix (MDGContext &context, MStatus *ReturnStatus=NULL) const |
MStatus | setDisplayGateMask (bool displayGateMask) |
MStatus | setDisplayFilmGate (bool displayFilmGate) |
bool | isDisplayFilmGate (MStatus *ReturnStatus=NULL) const |
MStatus | setHorizontalFieldOfView (double fov) |
double | horizontalFieldOfView (MStatus *ReturnStatus=NULL) const |
MStatus | setVerticalFieldOfView (double fov) |
double | verticalFieldOfView (MStatus *ReturnStatus=NULL) const |
MStatus | setFocalLength (double focalLength) |
double | focalLength (MStatus *ReturnStatus=NULL) const |
MStatus | getFocalLengthLimits (double &min, double &max) const |
MStatus | setLensSqueezeRatio (double lensSqueezeRatio) |
double | lensSqueezeRatio (MStatus *ReturnStatus=NULL) const |
MStatus | setClippingPlanes (bool ClippingPlanes) |
bool | isClippingPlanes (MStatus *ReturnStatus=NULL) const |
MStatus | setNearClippingPlane (double dNear) |
double | nearClippingPlane (MStatus *ReturnStatus=NULL) const |
MStatus | setFarClippingPlane (double dFar) |
double | farClippingPlane (MStatus *ReturnStatus=NULL) const |
MStatus | setNearFarClippingPlanes (double dNear, double dFar) |
MStatus | setDepthOfField (bool depthOfField) |
bool | isDepthOfField (MStatus *ReturnStatus=NULL) const |
MStatus | setFStop (double fStop) |
double | fStop (MStatus *ReturnStatus=NULL) const |
MStatus | setFocusDistance (double distance) |
double | focusDistance (MStatus *ReturnStatus=NULL) const |
MStatus | setNearFocusDistance (double nearFocusDistance) |
double | nearFocusDistance (MStatus *ReturnStatus=NULL) const |
MStatus | setFarFocusDistance (double farFocusDistance) |
double | farFocusDistance (MStatus *ReturnStatus=NULL) const |
MStatus | computeDepthOfField () |
MStatus | computeDepthOfField (double nearLimit) |
MStatus | setMotionBlur (bool motionBlur) |
bool | isMotionBlur (MStatus *ReturnStatus=NULL) const |
MStatus | setShutterAngle (double shutterAngle) |
double | shutterAngle (MStatus *ReturnStatus=NULL) const |
MStatus | setCenterOfInterest (double dist) |
double | centerOfInterest (MStatus *ReturnStatus=NULL) const |
MStatus | setIsOrtho (bool orthoState) |
MStatus | setIsOrtho (bool orthoState, double useDist) |
bool | isOrtho (MStatus *ReturnStatus=NULL) const |
MStatus | setOrthoWidth (double orthoWidth) |
double | orthoWidth (MStatus *ReturnStatus=NULL) const |
MStatus | setCameraScale (double scale) |
double | cameraScale (MStatus *ReturnStatus=NULL) const |
MStatus | setTumblePivot (const MPoint &point) |
MPoint | tumblePivot (MStatus *ReturnStatus=NULL) const |
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) |
bool | usePivotAsLocalSpace (MStatus *ReturnStatus=NULL) const |
Protected Member Functions |
|
virtual const char * | className () const |
Class name. |
enum MFnCamera::FilmFit |
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.
MFnCamera::~MFnCamera | ( | ) | [virtual] |
Destructor.
Class destructor.
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
Constructor.
Class constructor that initializes the function set to the given constant MDagPath object.
[in] | object | The const MDagPath to attach the function set to |
[out] | ReturnStatus | The return status |
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
MFn::Type MFnCamera::type | ( | ) | const [virtual] |
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.
[out] | ReturnStatus | Status code |
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.
[in] | parent | The parent of the new camera |
[out] | ReturnStatus | Status code |
MPoint MFnCamera::eyePoint | ( | MSpace::Space | space =
MSpace::kObject , |
|
MStatus * | ReturnStatus =
NULL |
|||
) | const |
Returns the eye point for the camera.
[in] | space | Specifies the coordinate system for this operation |
[out] | ReturnStatus | Status code |
MVector MFnCamera::viewDirection | ( | MSpace::Space | space =
MSpace::kObject , |
|
MStatus * | ReturnStatus =
NULL |
|||
) | const |
Returns the view direction for the camera.
[in] | space | Specifies the coordinate system for this operation |
[out] | ReturnStatus | Status code |
MVector MFnCamera::upDirection | ( | MSpace::Space | space =
MSpace::kObject , |
|
MStatus * | ReturnStatus =
NULL |
|||
) | const |
Returns the up direction vector for the camera.
[in] | space | Specifies the coordinate system for this operation |
[out] | ReturnStatus | Status code |
MVector MFnCamera::rightDirection | ( | MSpace::Space | space =
MSpace::kObject , |
|
MStatus * | ReturnStatus =
NULL |
|||
) | const |
Returns the right direction vector for the camera.
[in] | space | Specifies the coordinate system for this operation |
[out] | ReturnStatus | Status code |
MPoint MFnCamera::centerOfInterestPoint | ( | MSpace::Space | space =
MSpace::kObject , |
|
MStatus * | ReturnStatus =
NULL |
|||
) | const |
Returns the center of interest point for the camera.
[in] | space | Specifies the coordinate system for this operation |
[out] | ReturnStatus | Status code |
MStatus MFnCamera::set | ( | const MPoint & | wsEyeLocation, | |
const MVector & | wsViewDirection, | |||
const MVector & | wsUpDirection, | |||
double | horizFieldOfView, | |||
double | aspectRatio | |||
) |
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.
[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 |
MStatus MFnCamera::setEyePoint | ( | const MPoint & | eyeLocation, | |
MSpace::Space | space =
MSpace::kObject |
|||
) |
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.
[in] | eyeLocation | The eye location to set |
[in] | space | Specifies the coordinate system for this operation |
MStatus MFnCamera::setCenterOfInterestPoint | ( | const MPoint & | centerOfInterest, | |
MSpace::Space | space =
MSpace::kObject |
|||
) |
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.
[in] | centerOfInterest | Center of interest point to be set |
[in] | space | Specifies the coordinate system for this operation |
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.
[in] | otherCamera | Camera to compare perspective with |
[out] | ReturnStatus | Status code |
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.
[in] | otherCamera | Camera to copy view from |
MStatus MFnCamera::getFilmFrustum | ( | double | distance, | |
MPointArray | clipPlanes, | |||
bool | applyPanZoom =
false |
|||
) | const |
This method is not available in Python.
Returns the film frustum for the camera. The frustum defines the projective transformation.
[in] | distance | Specifies the focal length |
[out] | clipPlanes | point array to store the clip planes |
[in] | applyPanZoom | specifies whether to apply 2D pan/zoom |
MStatus MFnCamera::getFilmFrustum | ( | double | distance, | |
double & | hSize, | |||
double & | vSize, | |||
double & | hOffset, | |||
double & | vOffset, | |||
bool | applyPanZoom =
false |
|||
) | const |
Returns the film frustum for the camera. The frustum defines the projective transformation.
[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 |
MStatus MFnCamera::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.
[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 |
MStatus MFnCamera::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. 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:
[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 |
MStatus MFnCamera::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.
[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 |
MStatus MFnCamera::getRenderingFrustum | ( | double | windowAspect, | |
double & | left, | |||
double & | right, | |||
double & | bottom, | |||
double & | top | |||
) | const |
Computes and returns the rendering frustum for the camera. This is the frustum that the maya renderer uses.
[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 |
MFloatMatrix MFnCamera::projectionMatrix | ( | MStatus * | ReturnStatus =
NULL |
) | const |
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.
[out] | ReturnStatus | Status code |
MFloatMatrix MFnCamera::projectionMatrix | ( | MDGContext & | context, | |
MStatus * | ReturnStatus =
NULL |
|||
) | const |
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.
[in] | context | DG time-context to specify time of evaluation. |
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setHorizontalFilmAperture | ( | double | hFilmAperture | ) |
Change the horizontal size of the camera aperture. Unit used is inches.
[in] | hFilmAperture | Horizontal file aperture value to be set |
double MFnCamera::horizontalFilmAperture | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the horizontal film aperture for the camera.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setVerticalFilmAperture | ( | double | vFilmAperture | ) |
Change the vertical size of the camera aperture. Unit used is inches.
[in] | vFilmAperture | The vertical film aperture for the camera |
double MFnCamera::verticalFilmAperture | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the vertical film aperture for the camera.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::getFilmApertureLimits | ( | double & | min, | |
double & | max | |||
) | const |
Returns the maximum and minimum film aperture limits for the camera.
[out] | min | Storage for the minimum film aperture limit |
[out] | max | Storage for the maximum film aperture limit |
MStatus MFnCamera::setAspectRatio | ( | double | aspectRatio | ) |
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.
[in] | aspectRatio | The aspect ratio to be set |
double MFnCamera::aspectRatio | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the aspect ratio for the camera.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::getAspectRatioLimits | ( | double & | min, | |
double & | max | |||
) | const |
Returns the minimum and maximum aspect ratio limits for the camera.
[out] | min | Storage for the minimum aspect ratio limit |
[out] | max | Storage for the maximum aspect ratio limit |
MStatus MFnCamera::setVerticalLock | ( | bool | lockFlag | ) |
Sets the vertical lock to on or off for the camera.
[in] | lockFlag | Vertical lock value to be set |
bool MFnCamera::isVerticalLock | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Determines if vertical lock is turned on for the camera.
[out] | ReturnStatus | Status code |
double MFnCamera::horizontalFilmOffset | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the horizontal offset of the film. Unit used is inches.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setHorizontalFilmOffset | ( | double | hOffset | ) |
Change the horizontal offset of the film. Unit used is inches.
[in] | hOffset | The horizontal film offset value to be set |
double MFnCamera::verticalFilmOffset | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Change the vertical offset of the film. Unit used is inches.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setVerticalFilmOffset | ( | double | vOffset | ) |
Change the vertical offset of the film. Unit used is inches.
[in] | vOffset | The vertical film offset value to be set |
bool MFnCamera::shakeEnabled | ( | MStatus * | ReturnStatus =
NULL |
) | const |
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.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setShakeEnabled | ( | bool | enabled | ) |
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.
[in] | enabled | The film-based camera shake toggle value to be set |
double MFnCamera::horizontalShake | ( | MStatus * | ReturnStatus =
NULL |
) | const |
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.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setHorizontalShake | ( | double | hOffset | ) |
Change the horizontal film-based camera shake value. Unit used is inches.
[in] | hOffset | The horizontal film-based camera shake value to be set |
double MFnCamera::verticalShake | ( | MStatus * | ReturnStatus =
NULL |
) | const |
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.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setVerticalShake | ( | double | vOffset | ) |
Changes the vertical film-based camera shake value. Unit used is inches.
[in] | vOffset | The vertical film-based camera shake value to be set |
bool MFnCamera::shakeOverscanEnabled | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the toggle value for the camera shake overscan attribute. If this attribute is false, the shakeOverscan value is ignored by the camera.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setShakeOverscanEnabled | ( | bool | enabled | ) |
Changes the toggle value for the camera shake overscan enabled attribute. If this attribute is false, the shakeOverscan value is ignored by the camera.
[in] | enabled | The film-based camera shake overscan toggle value to be set |
double MFnCamera::shakeOverscan | ( | MStatus * | ReturnStatus =
NULL |
) | const |
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.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setShakeOverscan | ( | double | overscan | ) |
Changes the camera shake overscan value. Unit is a multiplier to the film aperture size. This attribute will affect the output render.
[in] | overscan | The camera shake overscan value to be set |
bool MFnCamera::panZoomEnabled | ( | MStatus * | ReturnStatus =
NULL |
) | const |
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.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setPanZoomEnabled | ( | bool | enabled | ) |
Changes the toggle value for the camera 2D pan/zoom enabled attribute.
[in] | enabled | The camera 2D pan/zoom enabled toggle value to be set |
bool MFnCamera::renderPanZoom | ( | MStatus * | ReturnStatus =
NULL |
) | const |
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.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setRenderPanZoom | ( | bool | render | ) |
Changes the toggle value for the camera render 2D pan/zoom enabled attribute.
[in] | render | The camera render 2D pan/zoom toggle value to be set |
double MFnCamera::horizontalPan | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Return the camera 2D horizontal pan value. Unit is inches.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setHorizontalPan | ( | double | hPan | ) |
Changes the camera 2D horizontal pan value. Unit is inches.
[in] | hPan | The camera 2D horizontal pan value to be set |
double MFnCamera::verticalPan | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Return the camera 2D vertical pan value. Unit is inches.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setVerticalPan | ( | double | vPan | ) |
Changes the camera 2D vertical pan value. Unit is inches.
[in] | vPan | The camera 2D vertical pan value to be set |
double MFnCamera::zoom | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Return the camera 2D zoom value, which is the percent over the film viewable frustum to display
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setZoom | ( | double | zoom | ) |
Changes the camera 2D zoom value.
[in] | zoom | The camera 2D zoom value to be set |
bool MFnCamera::stereoHITEnabled | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the toggle value for the stereo HIT enabled attribute. If this attribute is false, the stereoHIT value is ignored by the camera.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setStereoHITEnabled | ( | bool | enabled | ) |
Changes the toggle value for the stereo HIT enabled attribute. If this attribute is false, the stereoHIT value is ignored by the camera.
[in] | enabled | The film-based camera stereo HIT toggle value to be set |
double MFnCamera::stereoHIT | ( | MStatus * | ReturnStatus =
NULL |
) | const |
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.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setStereoHIT | ( | double | hit | ) |
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.
[in] | hit | The stereo HIT value to be set |
Sets how the digital image is to be fitted to the film back.
[in] | filmFit | The type of film fit |
MFnCamera::FilmFit MFnCamera::filmFit | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns how the digital image is being fitted to the film back.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setFilmFitOffset | ( | double | filmFitOffset | ) |
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).
[in] | filmFitOffset |
double MFnCamera::filmFitOffset | ( | MStatus * | ReturnStatus =
NULL |
) | const |
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).
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setOverscan | ( | double | overscan | ) |
Set the percent of overscan for this camera.
[in] | overscan |
double MFnCamera::overscan | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the percent of overscan for this camera.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setHorizontalRollPivot | ( | double | horizontalRollPivot | ) |
Set the horizontal roll pivot for film back roll.
[in] | horizontalRollPivot | Specifies the horizontal pivot value. |
double MFnCamera::horizontalRollPivot | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the current horizontal roll pivot value.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setVerticalRollPivot | ( | double | verticalRollPivot | ) |
Set the vertical roll pivot for film back roll.
[in] | verticalRollPivot | Specifies the vertical pivot value. |
double MFnCamera::verticalRollPivot | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the vertical roll pivot's value.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setFilmRollValue | ( | double | filmRollValue | ) |
Set the film roll value for film back.
[in] | filmRollValue | Specifies the amount rotation in the film back. The film back rotation value is specified in radians. |
double MFnCamera::filmRollValue | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the current roll value in radians.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setFilmRollOrder | ( | RollOrder | filmRollOrder | ) |
Assign the order in which the film back rotation is applied with respect to the pivot point.
There are 2 choices.
[in] | filmRollOrder | The order to apply the film roll. |
MFnCamera::RollOrder MFnCamera::filmRollOrder | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the current roll order
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setPreScale | ( | double | sf | ) |
Set the pre scale value.
[in] | sf | The scaling factor. |
double MFnCamera::preScale | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Return the post projection matrix's pre-scale value.
[out] | ReturnStatus | Status code. |
MStatus MFnCamera::setPostScale | ( | double | sf | ) |
Set the post scale value.
[in] | sf | The scaling factor. |
double MFnCamera::postScale | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Return the post projection matrix's post-scale value.
[out] | ReturnStatus | Status code. |
MStatus MFnCamera::setFilmTranslateH | ( | double | translate | ) |
Set the horizontal film translate.
[in] | translate | The amount of translation normalized to the viewing area. |
double MFnCamera::filmTranslateH | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the horizontal film translate value. This value corresponds to the normalized viewport.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setFilmTranslateV | ( | double | translate | ) |
Set the vertical film translate.
[in] | translate | The amount of translation normalized to the viewing area. |
double MFnCamera::filmTranslateV | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the vertical film translate value. This value corresponds to the normalized viewport, [-1,1].
[out] | ReturnStatus | Status code |
MFloatMatrix MFnCamera::postProjectionMatrix | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the post projection matrix used to compute film roll on the film back plane.
[out] | ReturnStatus | Status code |
MFloatMatrix MFnCamera::postProjectionMatrix | ( | MDGContext & | context, | |
MStatus * | ReturnStatus =
NULL |
|||
) | const |
Returns the post projection matrix used to compute film roll on the film back plane.
[in] | context | DG time-context to specify time of evaluation |
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setDisplayGateMask | ( | bool | displayGateMask | ) |
Activate shaded display of the film or resolution gate mask when looking through the camera. Does not activate the film or resolution gate display.
[in] | displayGateMask | Specifies whether to display the film gate shaded. |
MStatus MFnCamera::setDisplayFilmGate | ( | bool | displayFilmGate | ) |
Activate display of the film gate icons when looking through the camera.
[in] | displayFilmGate | Specifies whether to display the film gate. |
bool MFnCamera::isDisplayFilmGate | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Determines if the film gate icons are displayed when looking through the camera.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setHorizontalFieldOfView | ( | double | fov | ) |
Sets the horizontal field of view for the camera.
[in] | fov | The horizontal field of view value to be set |
double MFnCamera::horizontalFieldOfView | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the horizontal field of view for the camera.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setVerticalFieldOfView | ( | double | fov | ) |
Sets the vertical field of view for the camera.
[in] | fov | The vertical field of view value to be set |
double MFnCamera::verticalFieldOfView | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the vertical field of view for the camera.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setFocalLength | ( | double | focalLength | ) |
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.
[in] | focalLength | The focal length value to be set |
double MFnCamera::focalLength | ( | MStatus * | ReturnStatus =
NULL |
) | const |
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.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::getFocalLengthLimits | ( | double & | min, | |
double & | max | |||
) | const |
Returns the focal length limits for the camera.
[out] | min | Storage for the minimum focal length limit |
[out] | max | Storage for the maximum focal length limit |
MStatus MFnCamera::setLensSqueezeRatio | ( | double | aspectRatio | ) |
Set the squeeze ratio of the lens. The aspect ratio is expressed as width/height.
[in] | aspectRatio | The lens squeeze ratio to be set |
double MFnCamera::lensSqueezeRatio | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the lens squeeze ratio for the camera.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setClippingPlanes | ( | bool | ClippingPlanes | ) |
Turn on/off manual setting of clip planes.
[in] | ClippingPlanes |
bool MFnCamera::isClippingPlanes | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Determines whether manual clipping planes are activated.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setNearClippingPlane | ( | double | dNear | ) |
Set the distances to the Near Clipping Plane.
[in] | dNear | The near clipping plane value to be set |
double MFnCamera::nearClippingPlane | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the distance to the near clipping plane.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setFarClippingPlane | ( | double | dFar | ) |
Set the distances to the Far Clipping Plane.
[in] | dFar | The far clipping plane value to be set |
double MFnCamera::farClippingPlane | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the distance to the far clipping plane.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setNearFarClippingPlanes | ( | double | dNear, | |
double | dFar | |||
) |
Set the distances to the Near and Far Clipping Planes.
[in] | dNear | The near clipping plane value to be set |
[in] | dFar | The far clipping plane value to be set |
MStatus MFnCamera::setDepthOfField | ( | bool | depthOfField | ) |
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.
[in] | depthOfField | The depth of field value to be set |
bool MFnCamera::isDepthOfField | ( | MStatus * | ReturnStatus =
NULL |
) | const |
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.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setFStop | ( | double | fStop | ) |
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.
[in] | fStop | The F/Stop value to be set |
double MFnCamera::fStop | ( | MStatus * | ReturnStatus =
NULL |
) | const |
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.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setFocusDistance | ( | double | distance | ) |
Set the focus at a certain distance in front of the camera.
[in] | distance | The focus distance to be set |
double MFnCamera::focusDistance | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the focus distance for the camera. This value sets the focus at a certain distance in front of the camera.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setNearFocusDistance | ( | double | nearFocusDistance | ) |
Set the nearest distance within the well-focus region
[in] | nearFocusDistance | The near focus distance value to be set |
double MFnCamera::nearFocusDistance | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the linear distance to the near focus plane.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setFarFocusDistance | ( | double | farFocusDistance | ) |
Set the farthest distance within the well-focus region
[in] | farFocusDistance | The far focus distance value to be set |
double MFnCamera::farFocusDistance | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the linear distance to the far focus plane.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::computeDepthOfField | ( | ) |
MStatus MFnCamera::computeDepthOfField | ( | double | nearLimit | ) |
[in] | nearLimit |
MStatus MFnCamera::setMotionBlur | ( | bool | motionBlur | ) |
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.
[in] | motionBlur | true turns motion blur on, false turns it off. |
bool MFnCamera::isMotionBlur | ( | MStatus * | ReturnStatus =
NULL |
) | const |
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.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setShutterAngle | ( | double | shutterAngle | ) |
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.
[in] | shutterAngle | The shutter angle value to be set |
double MFnCamera::shutterAngle | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Return the current shutter angle which is one of the variables used to compute motion blur. The shutter angle is specified in radians.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::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).
[in] | dist | center of interest distance value |
double MFnCamera::centerOfInterest | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Return the linear distance from the camera's eye point to the center of interest.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setIsOrtho | ( | bool | orthoState | ) |
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.
[in] | orthoState | If true then the camera will be orthographic |
MStatus MFnCamera::setIsOrtho | ( | bool | orthoState, | |
double | useDist | |||
) |
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.
[in] | orthoState | If true then the camera will be orthographic |
[in] | useDist |
bool MFnCamera::isOrtho | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Determines if the camera is in orthographic mode.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setOrthoWidth | ( | double | orthoWidth | ) |
Sets a new width for the ortho camera. Bad values are ignored.
[in] | orthoWidth | The ortho width value to be set |
double MFnCamera::orthoWidth | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the orthographic projection width.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setCameraScale | ( | double | scale | ) |
Sets the camera scale.
[in] | scale | The camera scale value to be set |
double MFnCamera::cameraScale | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the camera scale.
[out] | ReturnStatus | Status code |
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.
[in] | point | The tumble pivot location to be set |
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.
[out] | ReturnStatus | Status code |
MStatus MFnCamera::setStereo | ( | bool | stereo | ) |
Obsolete & no script support.
This method is obsolete. This method is not available in Python.
[in] | stereo | Unused. |
bool MFnCamera::isStereo | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Obsolete & no script support.
This method is obsolete. This method is not available in Python.
[out] | ReturnStatus | Status code. Will be set to MS::kSuccess. |
MStatus MFnCamera::setParallelView | ( | bool | parallelView | ) |
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.
[in] | parallelView | Unused. |
bool MFnCamera::isParallelView | ( | MStatus * | ReturnStatus =
NULL |
) | const |
obsolete & no script support
This method is obsolete. This method is not available in Python.
[out] | ReturnStatus | Status code. Will be set to MS::kSuccess. |
MStatus MFnCamera::setEyeOffset | ( | double | eyeOffset | ) |
Obsolete & no script support.
This method is obsolete. This method is not available in Python.
[in] | eyeOffset | Unused. |
double MFnCamera::eyeOffset | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Obsolete & no script support.
This method is obsolete. This method is not available in Python.
[out] | ReturnStatus | Status code. Will be set to MS::kSuccess. |
MStatus MFnCamera::getFilmFrustum | ( | double | distance, | |
MPoint | clipPlane[4], | |||
bool | applyPanZoom =
false |
|||
) | const |
No script support.
Returns the film frustum for the camera. The frustum defines the projective transformation.
[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 |
MStatus MFnCamera::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. 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.
[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. |
bool MFnCamera::usePivotAsLocalSpace | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the value of the local axis tumble setting for this camera.
[out] | ReturnStatus | Status code |
Autodesk® Maya® 2011 © 1997-2010 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |