pymel.core.windows.viewManip¶
- viewManip(*args, **kwargs)¶
Mel access to the view cube manipulator. In query mode, return type is based on queried flag.
Flags:
Long Name / Short Name Argument Types Properties bottomLeft / bl bool Positions the cube in the bottom left of the screen. bottomRight / br bool Positions the cube in the bottom right of the screen. compassAngle / ca float Angle (in degrees) to rotate the compass. dragSnap / ds bool Enable snapping of orbit direction to view cube part directions during drag operation. drawCompass / dc bool Show compass below the view cube. fitToView / ftv bool Fits the scene bounding box to the active view. frontParameters / fp unicode goDefault / gd bool goHome / gh bool homeParameters / hp unicode levelCamera / lc bool Flattens the camera view rotation relative to the ground plane. minOpacity / mo float 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). namespace / ns unicode postCommand / p unicode preCommand / pr unicode preserveSceneUp / psu bool resetFront / rf bool resetHome / rh bool restoreCenter / rc bool Repositions the pivot point for orbiting/tumbling the scene to the center of the scene’s bounding box. selectionLockParameters / slp unicode setFront / sf bool setHome / sh bool size / s unicode Set or query the size of the View Cube, which can be one of tiny, small, normal, largeor auto. When set to autothe View Cube will be automatically set to the size most appropriate for the view. toggleSelectionLock / tsl bool topLeft / tl bool Positions the cube in the top left of the screen. topRight / tr bool Positions the cube in the top right of the screen. visible / v bool Shows/hides the view manip. zoomToFitScene / zf bool Zoom the camera during animated transitions to fit the scene object in the viewport. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.viewManip
Example:
import pymel.core as pm #Position the view cube in the top left of the screen and set it to fully opaque pm.viewManip(topLeft=True, minOpacity=1)