hi , I am lost.
I try to render using the following, but it always says :
"Warning: Camera is not renderable at this time; skipping image //
projects/default/testPyRender.bmp."
import maya.standalone
maya.standalone.initialize(name='python')
import maya.cmds as cmds
cmds.file('c:/download/mel/testPyRender.mb',o=True)
cam = cmds.camera(centerOfInterest=100, focalLength=35, lsr=1,
cameraScale=1, horizontalFilmAperture=1.41732, \
horizontalFilmOffset=0,
verticalFilmAperture=0.94488, verticalFilmOffset=0, \
filmFit='Fill', overscan=1, motionBlur=0,
shutterAngle=144, nearClipPlane=0.1, \
farClipPlane=1000000, orthographic=0,
orthographicWidth=30)
cmds.setAttr(cam[1] + ".backgroundColor", type="double3 0.8 0.8 0.8")
cmds.setAttr('defaultRenderGlobals.imageFormat',20)
renderedImg = cmds.render(cam[0], x=256, y=256)
cmds.sysFile(renderedImg, rename='c:/download/mel/moinmoin.bmp')
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---