// setRenderableCamera 1.1 // by Volker Heisterberg (volk@renderwahnsinn.de) // Usage: select the camera you want to render and run the script, // all the other cameras will be set to unrenderable! // Version History: // 1.0: Initial Release // 1.1: Fixed problems with light-cameras created when looking through lights global proc setRenderCam() { string $selection[] = `ls -sl`; string $renderCam = $selection[0]; string $cameraTransforms[] = `listTransforms -cameras`; int $cameraCount = size($cameraTransforms); for ($i=0; $i<$cameraCount; $i++) { int $t = `strcmp $renderCam $cameraTransforms[$i]`; if ($t != 0) { select $cameraTransforms[$i]; pickWalk -d down; string $sel2[] = `ls -sl`; string $selShape = $sel2[0]; int $test = `strcmp $renderCam $selShape`; if ($test != 0) { setAttr ($selShape + ".renderable") 0; } else { setAttr ($selShape + ".renderable") 1; } } else { select $cameraTransforms[$i]; pickWalk -d down; string $sel2[] = `ls -sl`; string $selShape = $sel2[0]; string $camCheck = `nodeType $selShape`; if ($camCheck== "camera") setAttr ($selShape + ".renderable") 1; } } select $renderCam; }