Hi David,

thanks for your suggestion. I've just added your code, but yet nothing 
changed...

I've also added this bit of code to set only one camera renderable (I had 
it in another test script, but forgot to add it to the snippet in the 
previous post).

import maya.standalone
maya.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 cancel
cmds.BatchRender() # no result
cmds.render()      # renders just fine, but in MayaSoftware :(
cmds.vrend()       # V-Ray error: Cannot get the object for the current 
render layer:

But still cannot get it to work. 

Please let me know if you've any idea!

Thanks.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/5cabf2d6-fc8f-403d-9805-159839cebe1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to