class counterpart of mel function camera
Create, edit, or query a camera with the specified properties. The resulting camera can be repositioned using the viewPlace command. Many of the camera settings only affect the resulting rendered image. E.g. the F/Stop, shutter speed, the film related options, etc. Scaling the camera icon does not change any camera properties.
Returns: Status code Status Codes: MS::kSuccess The method was successful MS::kFailure An object error has occurred
Derived from api method maya.OpenMaya.MFnCamera.computeDepthOfField
Undo is not currently supported for this method
Copy the camera settings related to the perspective from the given camera view.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.copyViewFrom
Undo is not currently supported for this method
The dolly command moves a camera along the viewing direction in the world space. The viewing-direction and up-direction of the camera are not altered. There are two modes of operation: Relative mode: for a perspective camera, the camera is moved along its viewing direction, and the distance of travel is computed with respect to the current position of the camera in the world space. In relative mode, when the camera is moved, its COI is moved along with it, and is kept at the same distance, in front of the camera, as before applying the dolly operation. For orthographic camera, the viewing width of the camera is changed by scaling its ortho width by the new value specified on the command line. Absolute mode: for a perspective camera, the camera is moved along its viewing direction, to the distance that is computed with respect to the current position of the world center of interest (COI) of the camera. In the absolute mode, when the camera is moved, the COI of the camera is not moved with the camera, but it is fixed at its current location in space. For orthographic camera, the viewing width of the camera is changed by replacing its ortho width with the new value specified on the command line. This command may be applied to more than one cameras; objects that are not cameras are ignored. When no camera name supplied on the command line, this command is applied to all currently active cameras. The dolly command can be applied to either a perspective or an orthographic camera.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
absolute (abs) | bool | ||
This flag modifies the behavior of the distance and orthoScale flags. When used in conjunction with the distance flag, the distance argument specifies how far the camera’s eye point should be set from the camera’s center of interest. When used with the orthoScale flag, the orthoScale argument specifies the camera’s new ortho width. |
|||
distance (d) | float | ||
|
|||
dollyTowardsCenter (dtc) | bool | ||
This flag controls whether the dolly is performed towards the center of the view (if true), or towards the point where the user clicks (if false). By default, dollyTowardsCenter is on. Flag can have multiple arguments, passed either as a tuple or a list. |
|||
orthoScale (os) | float | ||
|
|||
relative (rel) | bool | ||
This flag modifies the behavior of the distance and orthoScale flags. When used in conjunction with the distance flag, the camera eye and center of interest are both moved by the amount specified by the distance flag’s argument. When used with the orthoScale flag, the orthoScale argument is used multiply the camera’s ortho width.By default the relative flag is always on. |
Derived from mel command maya.cmds.dolly
Example:
import pymel.core as pm
pm.camera()
# Result: [nt.Transform(u'camera1'), nt.Camera(u'cameraShape1')] #
# Moves the persp camera forward through its center of interest
pm.dolly( 'persp', abs=True, d=-3 )
# Move the persp camera and its center of interest.
pm.dolly( 'persp', d=-3 )
# Changes the ortho-width of the top camera to 7.5
pm.dolly( 'top', abs=True, os=7.5 )
# Scale the ortho-width of the top camera by a quarter from its current value.
pm.dolly( 'top', os=0.25 )
Returns the aspect ratio for the camera.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.aspectRatio
Returns the minimum and maximum aspect ratio limits for the camera.
Return type: | (float, float) |
---|
Derived from api method maya.OpenMaya.MFnCamera.getAspectRatioLimits
Returns the camera scale.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.cameraScale
Return the linear distance from the camera’s eye point to the center of interest.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.centerOfInterest
Returns the center of interest point for the camera.
Parameters : |
|
---|---|
Return type: | Point |
Derived from api method maya.OpenMaya.MSpace.centerOfInterestPoint
Activate display of the video field chart when looking through the camera.
Derived from mel command maya.cmds.camera
Activate the display of the film origin guide when looking through the camera.
Derived from mel command maya.cmds.camera
Activate display of the film pivot guide when looking through the camera.
Derived from mel command maya.cmds.camera
Display the gate mask, file or resolution, as a shaded area to the edge of the viewport.
Derived from mel command maya.cmds.camera
Activate display of the current rendering resolution (as defined in the render globals) when looking through the camera.
Derived from mel command maya.cmds.camera
Activate display of the video Safe Action guide when looking through the camera.
Derived from mel command maya.cmds.camera
Activate display of the video Safe Title guide when looking through the camera.
Derived from mel command maya.cmds.camera
Returns the eye point for the camera.
Parameters : |
|
---|---|
Return type: | Point |
Derived from api method maya.OpenMaya.MSpace.eyePoint
Returns the f-stop value for the camera.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.fStop
Returns the distance to the far clipping plane.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.farClippingPlane
Returns the linear distance to the far focus plane.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.farFocusDistance
Returns the maximum and minimum film aperture limits for the camera.
Return type: | (float, float) |
---|
Derived from api method maya.OpenMaya.MFnCamera.getFilmApertureLimits
Returns how the digital image is being fitted to the film back.
Return type: | Camera.FilmFit |
---|
Derived from api method maya.OpenMaya.MFnCamera.filmFit
Returns the film fit offset for the camera.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.filmFitOffset
Returns the film frustum for the camera. The frustum defines the projective transformation.
Parameters : |
|
---|---|
Return type: | (float, float, float, float) |
Derived from api method maya.OpenMaya.MFnCamera.getFilmFrustum
Returns the current roll value in angular units.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.filmRollValue
Returns the horizontal film translate value. This value corresponds to the normalized viewport.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.filmTranslateH
Returns the vertical film translate value. This value corresponds to the normalized viewport, [-1,1].
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.filmTranslateV
Returns the focal length for the camera.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.focalLength
Returns the focal length limits for the camera.
Return type: | (float, float) |
---|
Derived from api method maya.OpenMaya.MFnCamera.getFocalLengthLimits
Returns the focus distance for the camera. This value sets the focus at a certain distance in front of the camera.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.focusDistance
Specify the command to execute when viewSet -homeis applied to this camera. All occurances of %camerawill be replaced with the cameras name before viewSet runs the command.
Derived from mel command maya.cmds.camera
Returns the horizontal field of view for the camera.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.horizontalFieldOfView
Returns the horizontal film aperture for the camera.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.horizontalFilmAperture
Returns the horizontal offset of the film. Unit used is inches.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.horizontalFilmOffset
Return the camera 2D horizontal pan value. Unit is inches.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.horizontalPan
Returns the current horizontal roll pivot value.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.horizontalRollPivot
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.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.horizontalShake
Journal interactive camera commands. Commands can be undone when a camera is journaled.
Derived from mel command maya.cmds.camera
Returns the lens squeeze ratio for the camera.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.lensSqueezeRatio
Returns the distance to the near clipping plane.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.nearClippingPlane
Returns the linear distance to the near focus plane.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.nearFocusDistance
Returns the orthographic projection width.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.orthoWidth
Returns the percent of overscan for this camera.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.overscan
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.
Return type: | bool |
---|
Derived from api method maya.OpenMaya.MFnCamera.panZoomEnabled
Compute the horizontal and vertical field of view in angular units from the given viewport width and height.
Parameters : |
|
---|---|
Return type: | (float, float) |
Derived from api method maya.OpenMaya.MFnCamera.getPortFieldOfView
Return the post projection matrix’s post-scale value.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.postScale
Return the post projection matrix’s pre-scale value.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.preScale
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.
Return type: | bool |
---|
Derived from api method maya.OpenMaya.MFnCamera.renderPanZoom
Computes and returns the rendering frustum for the camera. This is the frustum that the maya renderer uses.
Parameters : |
|
---|---|
Return type: | (float, float, float, float) |
Derived from api method maya.OpenMaya.MFnCamera.getRenderingFrustum
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.
Return type: | bool |
---|
Derived from api method maya.OpenMaya.MFnCamera.shakeEnabled
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.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.shakeOverscan
Returns the toggle value for the camera shake overscan attribute. If this attribute is false, the shakeOverscan value is ignored by the camera.
Return type: | bool |
---|
Derived from api method maya.OpenMaya.MFnCamera.shakeOverscanEnabled
Return the current shutter angle which is one of the variables used to compute motion blur. The shutter angle is specified in angular units.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.shutterAngle
A startup camera is marked undeletable and implicit. This flag can be used to set or query the startup state of a camera. There must always be at least one startup camera.
Derived from mel command maya.cmds.camera
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.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.stereoHIT
Returns the toggle value for the stereo HIT enabled attribute. If this attribute is false, the stereoHIT value is ignored by the camera.
Return type: | bool |
---|
Derived from api method maya.OpenMaya.MFnCamera.stereoHITEnabled
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.
Return type: | Point |
---|
Derived from api method maya.OpenMaya.MFnCamera.tumblePivot
Returns the value of the local axis tumble setting for this camera.
Return type: | bool |
---|
Derived from api method maya.OpenMaya.MFnCamera.usePivotAsLocalSpace
Returns the vertical field of view for the camera.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.verticalFieldOfView
Returns the vertical film aperture for the camera.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.verticalFilmAperture
Change the vertical offset of the film. Unit used is inches.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.verticalFilmOffset
Return the camera 2D vertical pan value. Unit is inches.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.verticalPan
Returns the vertical roll pivot’s value.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.verticalRollPivot
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.
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.verticalShake
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:
Parameters : |
|
---|---|
Return type: | (float, float, float, float) |
Derived from api method maya.OpenMaya.MFnCamera.getViewParameters
Computes and returns the viewing frustum for the camera.
Parameters : |
|
---|---|
Return type: | (float, float, float, float) |
Derived from api method maya.OpenMaya.MFnCamera.getViewingFrustum
Camera world center of interest point.
Derived from mel command maya.cmds.camera
Camera world up vector. Flag can have multiple arguments, passed either as a tuple or a list.
Derived from mel command maya.cmds.camera
Return the camera 2D zoom value, which is the percent over the film viewable frustum to display
Return type: | float |
---|
Derived from api method maya.OpenMaya.MFnCamera.zoom
Returns true if the camera has same perspective settings as the given camera.
Parameters : |
|
---|---|
Return type: | bool |
Derived from api method maya.OpenMaya.MFnCamera.hasSamePerspective
Determines whether manual clipping planes are activated.
Return type: | bool |
---|
Derived from api method maya.OpenMaya.MFnCamera.isClippingPlanes
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.
Return type: | bool |
---|
Derived from api method maya.OpenMaya.MFnCamera.isDepthOfField
Determines if the film gate icons are displayed when looking through the camera.
Return type: | bool |
---|
Derived from api method maya.OpenMaya.MFnCamera.isDisplayFilmGate
Determine if motion blur is on/off for the camera.
Return type: | bool |
---|
Derived from api method maya.OpenMaya.MFnCamera.isMotionBlur
Determines if the camera is in orthographic mode.
Return type: | bool |
---|
Derived from api method maya.OpenMaya.MFnCamera.isOrtho
Determines if vertical lock is turned on for the camera.
Return type: | bool |
---|
Derived from api method maya.OpenMaya.MFnCamera.isVerticalLock
The orbit command revolves the camera(s) horizontally and/or vertically in the perspective window. The rotation axis is with respect to the camera. To revolve horizontally: the rotation axis is the camera up direction vector. To revolve vertically: the rotation axis is the camera left direction vector. When both the horizontal and the vertical angles are supplied on the command line, the camera is firstly revolved horizontally, then revolved vertically. This command may be applied to more than one camera; objects that are not cameras are ignored. When no camera name supplied, this command is applied to all currently active cameras.
(<function orbit at 0xb4acc80>, <function addCmdDocsCallback at 0xbc036e0>, (‘orbit’, ‘’), {})
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
horizontalAngle (ha) | float | ||
|
|||
pivotPoint (pp) | float, float, float | ||
|
|||
rotationAngles (ra) | float, float | ||
|
|||
verticalAngle (va) | float | ||
|
Derived from mel command maya.cmds.orbit
Example:
import pymel.core as pm
pm.camera()
# Result: [nt.Transform(u'camera1'), nt.Camera(u'cameraShape1')] #
pm.orbit( 'cameraShape1', ha=-30 )# Change the horizontal angle by -30 degrees
pm.orbit( 'cameraShape1', va=15 )# Change the vertical angle by 15 degrees
pm.orbit( 'cameraShape1', ra=(-30, 15) )# Change the horizontal angle by -30 degrees and the vertical angle by 15 degrees
Returns the post projection matrix used to compute film roll on the film back plane.
Return type: | FloatMatrix |
---|
Derived from api method maya.OpenMaya.MFnCamera.postProjectionMatrix
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.
Return type: | FloatMatrix |
---|
Derived from api method maya.OpenMaya.MFnCamera.projectionMatrix
Returns the right direction vector for the camera.
Parameters : |
|
---|---|
Return type: | Vector |
Derived from api method maya.OpenMaya.MSpace.rightDirection
The roll command rotates a camera about its viewing direction, a positive angle produces clockwise camera rotation, while a negative angle produces counter-clockwise camera rotation. The default mode is relative and the rotation is applied with respect to the current orientation of the camera. When mode is set to absolute, the rotation is applied with respect to the plane constructed from the following three vectors in the world space: the world up vector, the camera view vector, and the camera up vector. The rotation angle is specified in degrees. The roll command can be applied to either a perspective or an orthographic camera. This command may be applied to more than one camera; objects that are not cameras are ignored. When no camera name supplied, this command is applied to all currently active cameras.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
absolute (abs) | bool | ||
|
|||
degree (d) | float | ||
|
|||
relative (rel) | bool | ||
|
Derived from mel command maya.cmds.roll
Example:
import pymel.core as pm
pm.camera()
# Result: [nt.Transform(u'camera1'), nt.Camera(u'cameraShape1')] #
# Align the horizontal direction with the world horizon
pm.roll( 'cameraShape1', abs=True, d=0 )
# Roll the camera 15 degrees clockwise
pm.roll( 'cameraShape1', d=15 )
pm.roll( d=15 )
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 : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setAspectRatio
Sets the camera scale.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setCameraScale
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 : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setCenterOfInterest
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.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MSpace.setCenterOfInterestPoint
Turn on/off manual setting of clip planes.
Parameters : | ClippingPlanes : bool |
---|
Derived from api method maya.OpenMaya.MFnCamera.setClippingPlanes
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 : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setDepthOfField
Activate display of the video field chart when looking through the camera.
Derived from mel command maya.cmds.camera
Activate display of the film gate icons when looking through the camera.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setDisplayFilmGate
Activate the display of the film origin guide when looking through the camera.
Derived from mel command maya.cmds.camera
Activate display of the film pivot guide when looking through the camera.
Derived from mel command maya.cmds.camera
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 : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setDisplayGateMask
Undo is not currently supported for this method
Activate display of the current rendering resolution (as defined in the render globals) when looking through the camera.
Derived from mel command maya.cmds.camera
Activate display of the video Safe Action guide when looking through the camera.
Derived from mel command maya.cmds.camera
Activate display of the video Safe Title guide when looking through the camera.
Derived from mel command maya.cmds.camera
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.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MSpace.setEyePoint
Sets the f-stop value for the camera.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setFStop
Set the distances to the Far Clipping Plane.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setFarClippingPlane
Set the farthest distance within the well-focus region
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setFarFocusDistance
Sets how the digital image is to be fitted to the film back.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setFilmFit
Set the film fit offset for the camera.
Parameters : | filmFitOffset : float |
---|
Derived from api method maya.OpenMaya.MFnCamera.setFilmFitOffset
Set the film roll value for film back.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setFilmRollValue
Set the horizontal film translate.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setFilmTranslateH
Set the vertical film translate.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setFilmTranslateV
Sets the focal length for the camera.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setFocalLength
Set the focus at a certain distance in front of the camera.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setFocusDistance
Specify the command to execute when viewSet -homeis applied to this camera. All occurances of %camerawill be replaced with the cameras name before viewSet runs the command.
Derived from mel command maya.cmds.camera
Sets the horizontal field of view for the camera.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setHorizontalFieldOfView
Change the horizontal size of the camera aperture. Unit used is inches.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setHorizontalFilmAperture
Change the horizontal offset of the film. Unit used is inches.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setHorizontalFilmOffset
Changes the camera 2D horizontal pan value. Unit is inches.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setHorizontalPan
Set the horizontal roll pivot for film back roll.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setHorizontalRollPivot
Change the horizontal film-based camera shake value. Unit used is inches.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setHorizontalShake
Journal interactive camera commands. Commands can be undone when a camera is journaled.
Derived from mel command maya.cmds.camera
Set the squeeze ratio of the lens. The aspect ratio is expressed as width/height.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setLensSqueezeRatio
Turns motion blur on/off for the camera.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setMotionBlur
Set the distances to the Near Clipping Plane.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setNearClippingPlane
Set the nearest distance within the well-focus region
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setNearFocusDistance
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 : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setIsOrtho
Sets a new width for the ortho camera. Bad values are ignored.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setOrthoWidth
Set the percent of overscan for this camera.
Parameters : | overscan : float |
---|
Derived from api method maya.OpenMaya.MFnCamera.setOverscan
Changes the toggle value for the camera 2D pan/zoom enabled attribute.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setPanZoomEnabled
Set the post scale value.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setPostScale
Set the pre scale value.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setPreScale
Changes the toggle value for the camera render 2D pan/zoom enabled attribute.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setRenderPanZoom
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 : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setShakeEnabled
Changes the camera shake overscan value. Unit is a multiplier to the film aperture size. This attribute will affect the output render.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setShakeOverscan
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 : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setShakeOverscanEnabled
Change the current shutter angle which is one of the variables used to compute motion blur. The shutterAngle is specified in angular units.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setShutterAngle
A startup camera is marked undeletable and implicit. This flag can be used to set or query the startup state of a camera. There must always be at least one startup camera.
Derived from mel command maya.cmds.camera
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 : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setStereoHIT
Changes the toggle value for the stereo HIT enabled attribute. If this attribute is false, the stereoHIT value is ignored by the camera.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setStereoHITEnabled
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).
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setTumblePivot
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.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setUsePivotAsLocalSpace
Sets the vertical field of view for the camera.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setVerticalFieldOfView
Change the vertical size of the camera aperture. Unit used is inches.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setVerticalFilmAperture
Change the vertical offset of the film. Unit used is inches.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setVerticalFilmOffset
Sets the vertical lock to on or off for the camera.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setVerticalLock
Changes the camera 2D vertical pan value. Unit is inches.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setVerticalPan
Set the vertical roll pivot for film back roll.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setVerticalRollPivot
Changes the vertical film-based camera shake value. Unit used is inches.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setVerticalShake
Camera world center of interest point.
Derived from mel command maya.cmds.camera
Camera world up vector. Flag can have multiple arguments, passed either as a tuple or a list.
Derived from mel command maya.cmds.camera
Changes the camera 2D zoom value.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.setZoom
Convenience routine to set the camera viewing parameters. The specified values should be in world space where applicable.
Parameters : |
|
---|
Derived from api method maya.OpenMaya.MFnCamera.set
Undo is not currently supported for this method
The track command translates a camera horizontally or vertically in the world space. The viewing-direction and up- direction of the camera are not altered. There is no translation in the viewing direction. The track command can be applied to either a perspective or an orthographic camera. When no camera name is supplied, this command is applied to the camera in the active view.
(<function track at 0xb4d2d70>, <function addCmdDocsCallback at 0xbc036e0>, (‘track’, ‘’), {})
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
down (d) | float | ||
|
|||
left (l) | float | ||
|
|||
right (r) | float | ||
|
|||
upDistance01 (u) | float | ||
|
|||
upDistance02 (up) | float | ||
|
Derived from mel command maya.cmds.track
Example:
import pymel.core as pm
pm.camera()
# Result: [nt.Transform(u'camera1'), nt.Camera(u'cameraShape1')] #
pm.track( 'cameraShape1', d=10 )# To track the camera down
pm.track( 'cameraShape1', u=-10 )
pm.track( u=-10 )
The tumble command revolves the camera(s) by varying the azimuth and elevation angles in the perspective window. When both the azimuth and the elevation angles are supplied on the command line, the camera is firstly tumbled for the azimuth angle, then tumbled for the elevation angle. When no camera name is supplied, this command is applied to the camera in the active view. The camera’s rotate pivot will override a specifed pivot point if the rotate pivot is not at the camera’s eye point.
(<function tumble at 0xb4d5410>, <function addCmdDocsCallback at 0xbc036e0>, (‘tumble’, ‘’), {})
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
azimuthAngle (aa) | float | ||
|
|||
elevationAngle (ea) | float | ||
|
|||
localTumble (lt) | int | ||
Describes what point the camera will tumble around: 0 for the camera’s tumble pivot, 1 for the camera’s center of interest, and 2 for the camera’s local axis, offset by its tumble pivot. Flag can have multiple arguments, passed either as a tuple or a list. |
|||
pivotPoint (pp) | float, float, float | ||
|
|||
rotationAngles (ra) | float, float | ||
|
Derived from mel command maya.cmds.tumble
Example:
import pymel.core as pm
pm.camera()
# Result: [nt.Transform(u'camera1'), nt.Camera(u'cameraShape1')] #
pm.tumble( 'cameraShape1', aa=-30 )# To change the azimuth angle
pm.tumble( 'cameraShape1', ea=15 )# To change the elevation angle
pm.tumble( ra=(-30, 15) )# To change the azimuth angle and the elevation angle
Returns the up direction vector for the camera.
Parameters : |
|
---|---|
Return type: | Vector |
Derived from api method maya.OpenMaya.MSpace.upDirection
Returns the view direction for the camera.
Parameters : |
|
---|---|
Return type: | Vector |
Derived from api method maya.OpenMaya.MSpace.viewDirection