pymel.core.rendering.viewCamera¶
- viewCamera(*args, **kwargs)¶
The viewCamera command is used to position a camera to look directly at the side or top of another camera. This is primarily useful for the user when he or she is setting depth-of-field and clipping planes, if they are being used. The default behaviour: If no other flags are specified, the camera in the active panel is moved and the -t is presumed. If there is a camera selected, it is used as the target camera.
Flags:
Long Name / Short Name Argument Types Properties move / m PyNode Specifies which camera needs to move. sideView / s bool Position camera to look at the side of the target camera. topView / t bool Position camera to look at the top of the target camera (default). Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.viewCamera
Example:
import pymel.core as pm pm.viewCamera( 'cameraShape2', m='cameraShape1' ) # Move current view camera to top of camera1 pm.viewCamera( 'camera1' )