// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // Description: // Returns a list of all cameras that has been set as renderable. // The camera transform names are returned. // global proc string[] getRenderableCameras() { string $cameras[]; string $allCameras[] = `ls -cameras`; for ($cam in $allCameras) { if (`getAttr ($cam + ".renderable")`) { string $camTransforms[] = `listRelatives -parent $cam`; $cameras[size($cameras)] = size($camTransforms) ? $camTransforms[0] : $cam; } } return $cameras; }