Maya (python): Running Condition Command And Scriptjob Command From Within A Module
I'm creating a UI tool that loads during Maya's startup, and executes some modules AFTER VRay has initialized (otherwise an error is thrown). A suggestion from my broader questio
Solution 1:
try that,
import os
import maya.cmds as mc
import maya.mel as mel
vray_plugin_path_2016 = os.path.join('C:', os.sep, 'Program Files', 'Autodesk', 'Maya2016', 'vray', 'plug-ins', 'vrayformaya.mll')
#-----------------------------------------------------------------------
def is_vray_loaded(*args):
return mc.pluginInfo(vray_plugin_path_2016, q=1, l=True)
#-----------------------------------------------------------------------
def hey(*args):
print 'hey'
mc.condition('vray_initialized', initialize=True, d='idle', s=is_vray_loaded)
mc.scriptJob(ct=['vray_initialized', 'hey'])
Post a Comment for "Maya (python): Running Condition Command And Scriptjob Command From Within A Module"