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

Synopsis

lookThru( [editorName] [object] , [farClip=float], [nearClip=float])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

lookThru is NOT undoable, queryable, and NOT editable.

This command sets a particular camera to look through in a view. This command may also be used to view the negative z axis of lights or other DAG objects. The standard camera tools can then be used to place the object.

Note: if there are multiple objects under the transform selected, cameras and lights take precedence.

Return value

None

In query mode, return type is based on queried flag.

Related

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

Flags

farClip, nearClip
Long name (short name) Argument types Properties
nearClip(nc) float create
Used when setting near clip plane for a new look thru camera. Will not affect the attributes of an existing camera. Clip values must come before shape or view.
farClip(fc) float create
Used when setting clip far plane for a new look thru camera. Will not affect the attributes of an existing camera. Clip values must come before shape or view.

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.

Python examples

import maya.cmds as cmds

cmds.lookThru( 'cameraShape1', 'topView' )

cmds.lookThru( 'perspView', 'cameraShape1', nc=100, fc=200 )

cmds.lookThru( 'camera1' )

cmds.lookThru( 'nurbsSphere1', nc=0.001, fc=5000.0 )

cmds.lookThru( 'perspView', q=True )

cmds.lookThru( q=True )