Go to: Synopsis. Return value. Related. Flags. MEL examples.
 viewSet [-back] [-bottom] [-fitFactor float] [-front] [-home] [-leftSide] [-nextView] [-persp] [-previousView] [-rightSide] [-side] [-top] 
[camera]
      
viewSet is undoable, queryable, and NOT editable.
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 "fit" based 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.None
In query mode, return type is based on queried flag.
| Long name (short name) | Argument types | Properties | ||
|---|---|---|---|---|
| -persp(-p) |  |   | ||
| 
 | ||||
| -top(-top) |  |   | ||
| 
 | ||||
| -bottom(-bo) |  |   | ||
| 
 | ||||
| -rightSide(-rs) |  |   | ||
| 
 | ||||
| -leftSide(-ls) |  |   | ||
| 
 | ||||
| -side(-s) |  |   | ||
| 
 | ||||
| -front(-f) |  |   | ||
| 
 | ||||
| -back(-b) |  |   | ||
| 
 | ||||
| -home(-h) |  |   | ||
| 
 | ||||
| -previousView(-pv) |  |    | ||
| 
 | ||||
| -nextView(-nv) |  |    | ||
| 
 | ||||
| -fitFactor(-ff) | float |   | ||
| 
 | ||||
|  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 be used more than once in a command. | 
// Create a new camera string $cam[] = `camera`; string $camShape = $cam[1]; // Set cameraShape1 to the persp position viewSet -p $camShape; // Set the camera in the active view to the top position viewSet -t;