pymel.core.rendering.panZoom

panZoom(*args, **kwargs)

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.

Flags:

Long Name / Short Name Argument Types Properties
absolute / abs bool ../../../_images/create.gif
  This flag modifies the behavior of the distance and zoomRatio flags. If specified, the distance and zoomRatio value will be applied directly.
downDistance / d float ../../../_images/create.gif
  Set the amount of down pan distance in inches
leftDistance / l float ../../../_images/create.gif
  Set the amount of left pan distance in inches
relative / rel bool ../../../_images/create.gif
  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 ../../../_images/create.gif
  Set the amount of right pan distance in inches
upDistance / u float ../../../_images/create.gif
  Set the amount of up pan distance in inches
zoomRatio / z float ../../../_images/create.gif
  Set the amount of zoom ratio Flag can have multiple arguments, passed either as a tuple or a list.

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 )