This command positions the camera to one of the pre-defined positions. If the fit flag is set in conjunction with persp, top, side, or front; the view is fitbased on the list of selected objects (if there are any) or on all the objects if nothing is selected. If a camera is not specified, the camera in the active view will be used. If no flag is specified, the camera is set to the home position. In query mode, return type is based on queried flag.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
animate (an) | bool | ||
back (b) | bool | ||
|
|||
bottom (bo) | bool | ||
|
|||
fit (fit) | bool | ||
fitFactor (ff) | float | ||
|
|||
front (f) | bool | ||
|
|||
home (h) | bool | ||
Executes the camera’s home attribute command. Before the string is executed, all occurances of %camerawill be replaced by the camera’s name. Use the camera command to set a camera’s home command. |
|||
keepRenderSettings (krs) | bool | ||
leftSide (ls) | bool | ||
|
|||
namespace (ns) | unicode | ||
nextView (nv) | bool | ||
|
|||
persp (p) | bool | ||
|
|||
previousView (pv) | bool | ||
|
|||
rightSide (rs) | bool | ||
|
|||
side (s) | bool | ||
|
|||
t (t) | bool | ||
top (top) | bool | ||
|
Derived from mel command maya.cmds.viewSet
Example:
import pymel.core as pm
# Create a new camera
cam = pm.camera();
camShape = cam[1];
# Set cameraShape1 to the persp position
pm.viewSet( camShape, p=True )
# Set the camera in the active view to the top position
pm.viewSet( t=True )