pymel.core.rendering.listCameras

listCameras(*args, **kwargs)

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.

Flags:
Long name (short name) Argument Types Properties
orthographic (o) bool ../../../_images/create.gif
 
Display all orthographic cameras.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.
perspective (p) bool ../../../_images/create.gif
 
Display all perspective cameras.

Derived from mel command maya.cmds.listCameras

Example:

import pymel.core as pm

import maya.cmds as cmds

# List all cameras
pm.listCameras()
# Result: [u'front', u'persp', u'side', u'top'] #

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

Previous topic

pymel.core.rendering.lightlink

Next topic

pymel.core.rendering.lookThru

Core

Core Modules

Other Modules

This Page