[Maya 2012 64Bits, V-Ray for Maya 2.0 Beta 2, Windows7 64Bits]
How can I launch VRay RT from a button? Its always return an error:
Here is the code with several tries:
Thanks!!!!
How can I launch VRay RT from a button? Its always return an error:
Code:
# Error: TypeError: file C:\Program Files\Autodesk\Maya2012\Python\lib\site-packages\maya\app\commands.py line 17: Object is invalid #
Code:
import maya.cmds as cmds def launchRTRender(*args): print "launchRTRender" cmds.eval ("renderIntoNewWindow iprRender;") #Try 1 #cmds.eval ("RedoPreviousIPR;") #Try 2 #comrt = 'vrayStartIprRender "%s" %d %d "%s"' % ('renderView', 640, 480, "persp" ) #Try 3 #cmds.eval (comrt) #Try 3 #cmds.showWindow('MayaWindow') #Try 4 #cmds.setParent('MayaWindow') #Try 4 #cmds.eval ("IPRRenderIntoNewWindow;") #Try 4 cmds.window() cmds.columnLayout() cmds.button(label='RT Render', c=launchRTRender) cmds.showWindow()
Comment