Go to: Synopsis. Return value. Related. Flags. Python examples.
viewLookAt(
[camera]
, [position=[linear, linear, linear]])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
viewLookAt is undoable, NOT queryable, and NOT editable.
The viewLookAt command positions the specified camera so it is looking at the centroid of all selected objects. If no objects are specified the camera will look at the ground plane.None
Long name (short name) | Argument types | Properties | ||
---|---|---|---|---|
position(pos)
|
[linear, linear, linear]
|
|||
|
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 have multiple arguments, passed either as a tuple or a list. |
import maya.cmds as cmds # Create a new camera cam = cmds.camera() camera = cam[0] cmds.viewLookAt( camera, pos=(0.0, 1.0, 0.0) )