In Autodesk Maya, when I click on Display Render Settings button, there is an attribute called Renderable Camera. I need to set the right camera in this attribute via MEL script but I can't find the name of this attribute (I'm not even sure which node has this attribute in a first place). Can anyone help me on this? Thanks!
This attribute is called cameraShape#.renderable
and it must be set to true (for cameraShape1, cameraShape2, etc). Also you need to turn off all the other four scene cameras (top, front, side, persp). And then you can change main attributes for your renderable cam as well as output resolution.
camera -focalLength 24;
setAttr "cameraShape1.renderable" 1;
setAttr "frontShape.renderable" 0;
setAttr "perspShape.renderable" 0;
setAttr "sideShape.renderable" 0;
setAttr "topShape.renderable" 0;
setAttr "defaultResolution.width" 1024;
setAttr "defaultResolution.height" 512;
setAttr "cameraShape1.focalLength" 50;
setAttr "cameraShape1.farClipPlane" 100000;
setAttr "cameraShape1.depthOfField" 1;
setAttr "cameraShape1.backgroundColor" -type double3 0 1 1;
Attribute .renderable
is located in cameraShape# node.