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

Synopsis

viewManip([bottomLeft=boolean], [bottomRight=boolean], [compassAngle=float], [dragSnap=boolean], [drawCompass=boolean], [fitToView=boolean], [levelCamera=boolean], [minOpacity=float], [restoreCenter=boolean], [size=string], [topLeft=boolean], [topRight=boolean], [visible=boolean], [zoomToFitScene=boolean])

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

viewManip is undoable, queryable, and NOT editable.

Mel access to the view cube manipulator.

Return value

None

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

Flags

bottomLeft, bottomRight, compassAngle, dragSnap, drawCompass, fitToView, levelCamera, minOpacity, restoreCenter, size, topLeft, topRight, visible, zoomToFitScene
Long name (short name) Argument types Properties
bottomLeft(bl) boolean createquery
Positions the cube in the bottom left of the screen.
bottomRight(br) boolean createquery
Positions the cube in the bottom right of the screen.
compassAngle(ca) float createquery
Angle (in degrees) to rotate the compass.
dragSnap(ds) boolean createquery
Enable snapping of orbit direction to view cube part directions during drag operation.
drawCompass(dc) boolean createquery
Show compass below the view cube.
fitToView(ftv) boolean create
Fits the scene bounding box to the active view.
levelCamera(lc) boolean create
Flattens the camera view rotation relative to the ground plane.
minOpacity(mo) float createquery
Opacity level (in range [0,1]) on view cube when the cursor is away from it (it is fully opaque when the cursor is in the view cube area).
restoreCenter(rc) boolean create
Repositions the pivot point for orbiting/tumbling the scene to the center of the scene's bounding box.
size(s) string createquery
Set or query the size of the View Cube, which can be one of "tiny", "small", "normal", "large" or "auto". When set to "auto" the View Cube will be automatically set to the size most appropriate for the view.
topLeft(tl) boolean createquery
Positions the cube in the top left of the screen.
topRight(tr) boolean createquery
Positions the cube in the top right of the screen.
visible(v) boolean createquery
Shows/hides the view manip.
zoomToFitScene(zf) boolean createquery
Zoom the camera during animated transitions to fit the scene object in the viewport.

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

#Position the view cube in the top left of the screen and set it to fully opaque
cmds.viewManip(topLeft=True, minOpacity=1)