Oops, sorry, forgot that was slightly different. The PluginPreLoad doesn’t take any arguments, so it should be like this:
def __main__():
deadlinePlugin.LogInfo( "Running opus launcher sync" )
...etc...
Oops, sorry, forgot that was slightly different. The PluginPreLoad doesn’t take any arguments, so it should be like this:
def __main__():
deadlinePlugin.LogInfo( "Running opus launcher sync" )
...etc...
Thanks. Is there any way to access something like deadlinePlugin.RunProcess() from that scope, or do I need to rewrite that functionality myself using standard python libraries?
Yeah, you’d have several options here. You could use just the raw python stuff, the .NET stuff, or our own stuff
If you want to stick to the Deadline API, you can use the ProcessUtils functions:
ProcessUtils.SpawnProcess( "<executable>", "<arguments>", "<working dir>" )
and
ProcessUtils.WaitForExit( process, <timeout millis> )
So, translated from the script you posted previously, it should be like this:
from Deadline.Scripting import *
def __main__():
deadlinePlugin.LogInfo( "Running opus launcher sync" )
process = ProcessUtils.SpawnProcess( "C:\\Program Files\\Opus VFX\\Launcher\\launcher_silent.exe", "0000_ProjectName maya_2013", "C:\\Program Files\\Opus VFX\\Launcher" )
ProcessUtils.WaitForExit( process, 30000 )
Note that if you just want to wait for the process to finish, you can specify -1 for the timeout.
Awesome, that looks like it should do the trick. I’ll give it a try when I get a chance later today. Thanks!