import maya.standalonemaya.standalone.initialize()
import maya.cmds as cmds
filepath = r"C:\test_prj\rnd_test.mb"cmds.file(filepath, open=True, force=True)
cmds.workspace(r"C:\test_prj", openWorkspace=True)
cmds.loadPlugin('vrayformaya')
# the following functions were called one by one in different test files, here's just a recap
cmds.batchRender() # Result: There is currently no render to cancelcmds.BatchRender() # no resultcmds.render() # renders just fine, but in MayaSoftware :(cmds.vrend() # V-Ray error: Cannot get the object for the current render layer:--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/91ce3f96-692d-4761-955a-6443ce185c0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
| David Moulder Technical Animator / Artist squi...@gmail.com Professional Profile | Mobile: +44 (0)7814033242 |
| See who we know in common | Want a signature like this? |
import maya.standalonemaya.standalone.initialize()
import maya.cmds as cmds
import maya.mel as mel
filepath = r"C:\test_prj\rnd_test.mb"cmds.file(filepath, open=True, force=True)
cmds.workspace(r"C:\test_prj", openWorkspace=True)
# set only one camera renderable
render_cam_name = "render_cam"cam_ls = cmds.ls(type="camera")for cam in cam_ls: cmds.setAttr('{0}.renderable'.format(cam), False)cmds.setAttr('{0}Shape.renderable'.format(render_cam_name), True)
cmds.loadPlugin('vrayformaya')mel.eval("""setCurrentRenderer "vray" """)
# the following functions were called one by one in different test files, here's just a recap
cmds.batchRender() # Result: There is currently no render to cancelcmds.BatchRender() # no resultcmds.render() # renders just fine, but in MayaSoftware :(cmds.vrend() # V-Ray error: Cannot get the object for the current render layer:import maya.cmds as mc
currentLayer = mc.editRenderLayerGlobals(q=1, currentRenderLayer=True)
mc.vrend("-camera", "persp", "-layer", currentLayer)--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/5cabf2d6-fc8f-403d-9805-159839cebe1b%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/f5028a50-57fd-48d8-a696-458f9219b085%40googlegroups.com.