AWS Thinkbox Discussion Forums

Make Explore output directory required field in deadline7 submitter for Maya

Hi all, sometimes user did not put in job info for the output directory when submitting job causing user cant right click on job to ““Explore Job Output” context menu” in task list. There are output path in the plugin info but not the job info when I looked at the job properties.

a) How can we make it mandatory for user to fill in the info on the job output directory when submitting job? iei job wont get submitted if output path is not provided OR
b) How can job info variables for output directory be populated from the plugin variable i.e. OutputFilePath ?

Thanks

Hi, possible to inject the output path from maya submitter? say … in PostRenderTasks() ?

job = self.GetJob()
RepositoryUtils.SetJobOutputDirectories(job, self.NetworkRenderDirectory )
RepositoryUtils.SaveJob( job )

Hello!

The simplest solution would be to add a Custom Sanity check to make sure that the user fills that field in as well. That would make it mandatory.

But your idea to automate it would work. You’d want to use an OnJobSubmitted Event Plugin to do it, but it looks like you’re most of the way there anyways with that snippet.

Thanks @Justin_B – its working now with the snippet.

I want to check if there is OuputDirectory0= present in job info before running the snippet. I used this to check…

        # First check if the job output directory (OutputDirectory0) is empty
        Output_dir = self.GetJob().JobOutputDirectories[0]
        if not Output_dir:

But it gives this error:
Error: IndexError : array index out of range (Python.Runtime.PythonException)
File “none”, line 805, in PostRenderTasks

Any idea how to fix this ?

I used job.JobOutputDirectories and it is ok now :slight_smile:

However, view output right-click is missing because i cant figure out how to add outputfilename in the job info esp the file ext. Any suggestions pls ? Thx

What are you doing to add it? Just because you mention having issues with the file extension.

Depending on where you’re trying you’ll just be adding a key/value pair to the job info file.

The artists are working on different projects but using the same mayacmd.py – each project is rendered in different output extension i.e exr or png. So I dont know how to get this filename padding and populate the key/value pair in job.outputfilename into the job info file. I am running the snippet in PreRenderTasks() in mayacmd.py

That’s a little more complicated. It might be simpler to just make that field required so the artist can fill it in themselves as opposed to trying to do it automatically.

The problem is you can’t change the job info after the job has been submitted, so you’ll have to make the change in the submitter instead.

Privacy | Site terms | Cookie preferences