Hi,
I am trying to pull in the path to the scene file in a PostJobScript. I thought this was going to be straight forward, but nothing I have tried works yet.
#If Max scene was not submitted to Repo, this value will be set
sceneFile = SlaveUtils.GetCurrentPluginValue( "SceneFile" )
if(sceneFile is None or sceneFile == ""):
#none of these work
sceneFile = GetDataFilename()
sceneFile = ScriptUtils.GetDataFilename()
sceneFile = DataFilename()
#i can use similar code to get OutputDirectories, but this doesn't work.
auxFiles = SlaveUtils.GetCurrentJobValue("AuxillarySubmissionFileNames")
for aux in auxFiles:
if(aux.lower().endswith(".max") or aux.lower().endswith(".nk")):
sceneFile = aux
Any ideas? I could go back into each submission script and write an extra entry into the Plugin .job file, but the info already exists… just can’t get at it.
Thanks,
Paul
CafeFX
Hi Paul,
The following code should work:
from Deadline.Scripting import *
def __main__( *args ):
sceneFile = SlaveUtils.GetCurrentPluginValue( "SceneFile" )
LogInfo( "scene file: '" + sceneFile + "'" )
auxFiles = SlaveUtils.GetCurrentJobValue("AuxiliarySubmissionFileNames")
for aux in auxFiles:
LogInfo( "aux file: '" + aux + "'" )
You’ll notice that the spelling of is slightly different. We’ve left the typo in Auxillary in the XML files for backward compatibility, but fixed the typo in code (which is where the GetCurrentJobValue function pulls the data from).
Cheers,
Haha… ok. Please don’t make spelling corrections in one place and not the other. OR make the correction but continue to handle the misspelled one as well.
The documentation for SlaveUtils.GetCurrentJobValue explicitly tells you to look in the XML and that you can pull any Key from it. Going on that assumption I wasted a fair amount of time on something that should have been easy.
Thanks,
Paul
CafeFx
We completely agree that this was an oversight on our part. This particular inconsistency will be resolved in Deadline 4.0 (we will support both the correct and incorrect spelling). Sorry for the inconvenience.
Cheers,