Go to: Synopsis. Return value. Related. Flags. MEL examples.
viewPlace [-animate boolean] [-eyePoint linear linear linear] [-fieldOfView angle] [-lookAt linear linear linear] [-ortho] [-perspective] [-upDirection linear linear linear] [-viewDirection linear linear linear]
[camera]
viewPlace is undoable, NOT queryable, and NOT editable.
This command positions the camera as specified. The lookAt and
viewDirection flags are mutually exclusive, as are the ortho and
perspective flags. If this command switches a camera from ortho to
perspective or the other way around without specifying a new field
of view, then one is calculated based on a heuristic involving the
selected objects.
If the camera is not specified on the command line, the command
will check to see if there is a camera on the active list.
The user should be aware that some positions will be
unattainable. For example, using a new camera located at the
origin and specifying a lookAt of [0 0 -5] and an up of [1 1
1]. In these cases, the camera will always aim at the lookAt, and
the new up direction will be determined by transforming the
specified up into camera space and then projecting this vector
onto a plane defined by the camera's up and right vectors. Using
the example above, the new up vector will be [1 1 0].
None
camera, cameraView, dolly, listCameras, lookThru, orbit, roll, track, tumble, viewCamera, viewClipPlane, viewFit, viewHeadOn, viewLookAt, viewSet
animate, eyePoint, fieldOfView, lookAt, ortho, perspective, upDirection, viewDirection
Long name (short name) |
Argument types |
Properties |
|
-animate(-an)
|
boolean
|
|
|
If set to true then animate the camera transition from current
position to the final one.
|
|
-eyePoint(-eye)
|
linear linear linear
|
|
|
The new eye point in world coordinates.
|
|
-fieldOfView(-fov)
|
angle
|
|
|
The new field of view (in degrees, for perspective cameras,
and in world distance for ortho cameras)
|
|
-lookAt(-la)
|
linear linear linear
|
|
|
The new look-at point in world coordinates.
|
|
-ortho(-o)
|
|
|
|
Sets the camera to be orthgraphic.
|
|
-perspective(-p)
|
|
|
|
Sets the camera to be perspective.
|
|
-upDirection(-up)
|
linear linear linear
|
|
|
The new up direction vector.
|
|
-viewDirection(-vd)
|
linear linear linear
|
|
|
The new view direction vector.
|
|
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];
viewPlace -p -fov 20 $camShape;
viewPlace -eye 0 0 20 $camShape;
viewPlace -la 0 0 0 $camShape;