Go to: Synopsis. Return value. Flags. Python examples.
view2dToolCtx([boxzoom=boolean], [dolly=boolean], [track=boolean])
Note: Strings representing object names and
arguments must be separated by commas. This is not depicted in the
synopsis.
view2dToolCtx is undoable, queryable, and editable.
This class creates a context for the View Tools "track", "dolly",
and "box zoom" in the Hypergraph.
In query mode, return type is based on queried flag.
boxzoom, dolly,
track
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. |
import maya.cmds as cmds
# Create a new view2dTool context, set it to do dolly in the Hypergraph window, then switch to this tool
cmds.view2dToolCtx('view2dToolCtx1', dolly=True)
cmds.setToolTo('view2dToolCtx1')