Hi
When we export standalone jobs from either c4d 19, 20 and Houdini 16.5 and 17, we need to set different paths to different versions of the Redshift commandline executable.
We are setting env vars for rs command jobs with an event plugin. Can i modify the executable path somehow from the event plugin context?
I’ve brought up the ModifyCommandLineCallback before (I believe with regard to supporting environment variables) but that will let you change the executable, arguments, and working directory.
You’d just need to be smart about how you did you path replacement.
If it’s not immediately obvious, feel free to ask questions and I’ll help figure it out.
Hmm… I wonder if you might have another event or script which is actually setting that value somewhere (using “=” instead of “+=”. You could try and read the name of the function out to get an idea what script had set it:
C:\>python
Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> def hey():
... print("hey")
...
>>> hey()
hey
>>> f = hey
>>> print(f)
<function hey at 0x03BD61E0>
I tested here with 10.0.21 (I’m a bit behind!) with the following code:
from Deadline.Scripting import *
from FranticX.Diagnostics import *
def AlterCommandLine( executable, arguments, workingDirectory ):
print "Entering Command Line Hook"
print "-----Modified Command Line-----"
print " Executable: '{}'".format( executable )
print " Arguments: '{}'".format( arguments )
print "Working Dir: '{}'".format( workingDirectory )
print "-------------------------------"
# return the original or modified exe, args, workingDir even if pipeline not available
return (executable, arguments, workingDirectory)
def __main__( deadlinePlugin ):
deadlinePlugin.DebugLogging = True
deadlinePlugin.ModifyCommandLineCallback += AlterCommandLine
Thanks!
There was a copy of GlobalJobPreload.py in appdata/local/Thinkbox … that was running.
Works fine now.
Im not sure how can i get the env vars from the job in this context?