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

Synopsis

panZoomCtx([panMode=boolean], [zoomMode=boolean], [zoomScale=float])

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

panZoomCtx is undoable, queryable, and editable.

This command can be used to create camera 2D pan/zoom context.

Return value

string The name of the context

In query mode, return type is based on queried flag.

Flags

panMode, zoomMode, zoomScale
Long name (short name) Argument types Properties
zoomScale(zs) float createqueryedit
Scale the zoom. The smaller the scale the slower the drag.
panMode(pm) boolean create
Specify to create a camera 2D pan context, which is the default.
zoomMode(zm) boolean create
Specify to create a camera 2D zoom context.

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.panZoomCtx( 'panZoomContext', zs=1.0 )