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

Synopsis

listCameras([orthographic=boolean], [perspective=boolean], [ufeCameras=boolean])

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

listCameras is undoable, NOT queryable, and NOT editable.

Command to list all cameras. If no flags are given, both perspective and orthographic cameras will be displayed. This command returns an array of camera names. When the transform name uniquely identifies the camera it is used, otherwise the shape name will be returned.

Return value

string[]Command result

Related

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

Flags

orthographic, perspective, ufeCameras
Long name (short name) Argument types Properties
orthographic(o) boolean create
Display all orthographic cameras.
perspective(p) boolean create
Display all perspective cameras.
ufeCameras(ufe) boolean create
Will return cameras that are defined through the UFE interface as well as Maya cameras.

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

# List all Maya cameras
cmds.listCameras()

# List all Maya persp cameras
perspCameras = cmds.listCameras( p=True )

# List all Maya and non-Maya (thru Ufe) cameras
cmds.listCameras( ufe=True )