getting the InputFilename (path) for postTaskScript

I’m trying to make a custom job submission script from maya to deadline that would create a vrscene and submit it with Vray standalone then delete the vrscene file after the render is finished.

Here is where I’m a bit stuck :
I need to get the file path of the vrscene to be used on the post task python script, I saw the example given in the documentation that prints outputfile paths. But what I need is the input vrscene file path.

I tried to do it like this but it doesn’t work :unamused: :

def __main__( *args ): deadlinePlugin = args[0] job = deadlinePlugin.GetJob() fileName = job.InputFilename print fileName

So what’s the best way to get the file path in there so I can delete it ? could you guide me to a reference where to get those attributes that I can use ?

Your very close…just need to access the actual job plugin info props:

docs.thinkboxsoftware.com/produc … 165db33806

[code]from Deadline.Scripting import *

def main( *args ):
deadlinePlugin = args[0]
job = deadlinePlugin.GetJob()
fileName = job.GetJobPluginInfoKeyValue( “InputFilename” )
print fileName[/code]

Thank you Mike ! :smiley:

That works perfectly, now my tool is almost done, it creates the job files, submits them to Deadline and deletes the .vrscene file at the end.
The only thing left is creating the Vrscene file itself automatically, I could continue do basic maya commands to enable “export to a .vrscene file” then “render”, but my goal is to be able to track the exporting of this file so I can submit it to deadline automatically as soon as it’s done exporting, I know that in your mayaToDeadline plugin you actually have a progress bar for the vrscene export and it submits the job after it’s done, how can I achieve something like that ? All I need is a simple detection of the Vrscene export when finished to run the deadline command after that.

I would take a look at this file in our repo:

“…/submission/Maya/Main/SubmitMayaToDeadline.mel”

Here are some snippets to help you on your way…:

columnLayout -adj true -columnAttach "both" 4 -rowSpacing 4 buttonColumnLayout; rowLayout -numberOfColumns 5 -cw5 75 105 105 105 105; progressBar -width 65 -height 26 -minValue 0 -maxValue 100 -annotation "Deadline Submission Progress" frw_progBar;

if( $showProgress && `progressBar -exists frw_progBar` ) progressBar -edit -progress (`progressBar -query -maxValue frw_progBar` / 3) frw_progBar;