Set Vray Maya render settings
py
import maya.cmds as cmds
# Ensure plugins are loaded
cmds.loadPlugin("vrayformaya", quiet=True)
cmds.loadPlugin("vrayvolumegrid", quiet=True)
# Auto load
cmds.pluginInfo("vrayformaya", edit=True, autoload=True)
cmds.pluginInfo("vrayvolumegrid", edit=True, autoload=True)
# Edit attribs
cmds.setAttr("defaultRenderGlobals.currentRenderer", l=False)
cmds.setAttr("defaultRenderGlobals.currentRenderer", "vray", type="string")