Maxscript Submission

Hi Guys,

I had a quick question regarding submitting jobs that are dependent on another job from maxscript. I have essentially followed the maxscript submission tutorial that I have used as a basis for my submit function.

Below is a snippet of code that I am using to make the job dependent. parent is the id of the last job.

if parent != undefined then( SMTDSettings.SubmitAsDependent = True SMTDFunctions.collectJobs() for j = 1 to SMTDSettings.JobsArray.count do( if SMTDSettings.JobsArray[j][2] == parent then( SMTDSettings.DependencyJobItems[j] = true break ) ) )

I have pieced this together from just poking around so I may be way of the mark. If you can shed any light on how to do this it would be a big help. I just need to nut this one out and my submitter is complete.

Cheers,
Dave

Hi!

It really depends on whether you are creating the submission control files yourself or you are calling SMTD_Functions.CreateSubmitInfoFile().
In the latter case, you don’t need to do anything else. In the former, take a look at the ‘fn CreateSubmitInfoFile’ definition inside the SubmitMaxToDeadline_Functions.ms file to see how the array is used to build the string of dependency IDs and set the JobDependencies= property.

Cheers,
Bobo

All working now. For some reason I was calling SMTDFunctions.CreateSubmitInfoFile() before setting the dependency… Has been a long day.

Thanks for your help.

Cheers,
Dave