Go to: Synopsis. Return value. Related. Flags. MEL examples.

Synopsis

cameraView [-addBookmark] [-camera name] [-name string] [-removeBookmark] [-setCamera] [-setView] [object]

cameraView is undoable, NOT queryable, and editable.

This command creates a preset view for a camera which is then independent of the camera. The view stores a camera's eye point, center of interest point, up vector, tumble pivot, horizontal aperture, vertical aperature, focal length, orthographic width, and whether the camera is orthographic or perspective. These settings can be applied to any other camera through the set camera flag.

This command can be used for creation or edit of camera view objects. This command can only be executed with one of the add bookmark, or remove bookmark and one of set camera, or the set view flags set.

Return value

string(name of the camera view)

Related

camera, dolly, listCameras, lookThru, orbit, roll, track, tumble, viewCamera, viewClipPlane, viewFit, viewHeadOn, viewLookAt, viewPlace, viewSet

Flags

addBookmark, camera, name, removeBookmark, setCamera, setView
Long name (short name) Argument types Properties
-camera(-c) name edit
Specify the camera to use. This flag should be used in conjunction with the add bookmark, remove bookmark, set camera, or set view flags. If this flag is not specified the camera in the active model panel will be used.
-addBookmark(-ab) createedit
Associate this view with the camera specified or the camera in the active model panel. This flag can be used for creation or edit.
-name(-n) string create
Set the name of the view. This flag can only be used for creation.
-removeBookmark(-rb) edit
Remove the association of this view with the camera specified or the camera in the active model panel. This can only be used with edit.
-setCamera(-sc) edit
Set this view into a camera specified by the camera flag or the camera in the active model panel. This flag can only be used with edit.
-setView(-sv) edit
Set the camera view to match a camera specified or the active model panel. This flag can only be used with edit.

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.

MEL examples

// Save the current position of the persp camera.
string $homeName = `cameraView -camera persp`;

// Add this view to the persp bookmark menu.
cameraView -e -camera persp -ab $homeName;

// Change the persp camera position.
dolly -distance -30 persp;

// Create another bookmark for the zoomed position.
cameraView -camera persp -name "zoom" -ab;

// Restore original camera position.
cameraView -e -camera persp -sc $homeName;