The panZoom command pans/zooms the 2D film. The panZoom 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.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
absolute (abs) | bool | ||
|
|||
downDistance (d) | float | ||
|
|||
leftDistance (l) | float | ||
|
|||
relative (rel) | bool | ||
This flag modifies the behavior of the distance and zoomRatio flags. If specified, the distance or zoomRatio value is used multiply the camera’s existing value. By default the relative flag is always on. |
|||
rightDistance (r) | float | ||
|
|||
upDistance (u) | float | ||
|
|||
zoomRatio (z) | float | ||
|
Derived from mel command maya.cmds.panZoom
Example:
import pymel.core as pm
pm.camera()
# Result: [nt.Transform(u'camera1'), nt.Camera(u'cameraShape1')] #
pm.panZoom( 'cameraShape1', d=0.3 )
pm.panZoom( 'cameraShape1', abs=True, u=0.4 )
pm.panZoom( 'cameraShape1', z=0.5 )