Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 5th, 2012  |  syntax: None  |  size: 0.64 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. def findAllCameras():                  #function
  2.         Listcamnew = []                    # main list that needs to be filled
  3.         listofCamerasWShapes = cmds.ls(cameras = 1)   #lists all the cameras
  4.         CameraPar = cmds.listRelatives(listofCamerasWShapes, parent=1)
  5.         DefaultCam = (u'front', u'persp', u'side', u'top')
  6.         for callcam in CameraPar:
  7.                 if DefaultCam in CameraPar:
  8.                         str_list.remove(DefaultCam)
  9.                 camname = callcam.name
  10.                 Cameraxyz = cmds.getAttr(('callcam') + '.translate')
  11.                 StackingValuesofCamera = [camname, Cameraxyz]
  12.                 Listcamnew.append(StackingValuesofCamera)        
  13.         return CameraPar