Go to: Synopsis. Return value. Related. Flags. Python examples.

Synopsis

panZoom( [camera] , [absolute=boolean], [downDistance=linear], [leftDistance=linear], [relative=boolean], [rightDistance=linear], [upDistance=linear], [zoomRatio=float])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

panZoom is undoable, NOT queryable, and NOT editable.

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.

Return value

None

Related

camera, cameraView, dolly, listCameras, lookThru, orbit, roll, track, tumble, viewCamera, viewClipPlane, viewFit, viewHeadOn, viewLookAt, viewPlace, viewSet

Flags

absolute, downDistance, leftDistance, relative, rightDistance, upDistance, zoomRatio
Long name (short name) Argument types Properties
absolute(abs) boolean create
This flag modifies the behavior of the distance and zoomRatio flags. If specified, the distance and zoomRatio value will be applied directly.
relative(rel) boolean create
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.
leftDistance(l) linear create
Set the amount of left pan distance in inches
rightDistance(r) linear create
Set the amount of right pan distance in inches
upDistance(u) linear create
Set the amount of up pan distance in inches
downDistance(d) linear create
Set the amount of down pan distance in inches
zoomRatio(z) float create
Set the amount of zoom ratio

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

cmds.camera()

cmds.panZoom( 'cameraShape1', d=0.3 )

cmds.panZoom( 'cameraShape1', abs=True, u=0.4 )

cmds.panZoom( 'cameraShape1', z=0.5 )