I’m trying to write a script which does a quick render with some low quality settings and down-sizes the render, however this snippet doesn’t work for me…
mel.eval(‘vrend -camera persp -width 1000 -height 480’)
It just renders, but it doesn’t change the render size… any ideas?
vrend doesn’t accept resolution. You must change directly the vraySettings node:
setAttr "vraySettings.width" 1000;
setAttr "vraySettings.height" 480;
Ok thanks, for some reasons those attributes didn’t come up in the listener with echo all commands on.
I’m getting issues when I run the vrend()
It doesn’t render anything and I get this error
cmds.vrend()
# Warning: Created the file path for /_tmpTileTest_Proj_A_05. #
# Error: Cannot get the object for the current render layer: #
# Error: Cannot create output image file “/_tmpTileTest_Proj_A_05.jpg”: Permission denied (13) #
Where is the file saving?
How do I disable saving to file when rendering?
setAttr “vraySettings.dontSaveImage” 1;
Thanks, that fixed it.
Any idea why I always get this error when doing using vrend?
# Error: Cannot get the object for the current render layer: #
You can fix this by passing
-layer defaultRenderLayer
to vrend. I don’t think that you will have any issues even without it, but this is what the normal rendering does.
Great!
cmds.vrend(“-layer”, “defaultRenderLayer”)
Works!