AWS Thinkbox Discussion Forums

TaskFrameList attribute

Hi Everyone.

Does anybody knows how to use the TaskFrameList function to pass the task framerange instead to the job framerange to a template executing some Draft DPX conversion? I found this link :
thinkboxsoftware.com/deadlin … view/#Task

I don’t know if I must use it on the job submitter side or in the template. I already used the task framerange in a commandline submitter, using and , but I actually need to submit this DPX conversion from the Monitor.

Any advice or code example?
Thanks

How are you running the Draft template? I’m guessing you’re not submitting a separate Job through Deadline, since you’re wanting a Task’s FrameList instead of the overall Job’s FrameList… Are you using Draft in a Post-Task script?

I’ll admit that I’ve never thought of that before, and will have to do some testing if that’s the case. I can’t remember if we’re recycling the Plugin’s scope or not in post-task scripts…

I’m submitting it through a right-click script. I need Draft to convert some EXR to DPX and do some other stuff. I don’t need to generate a Quicktime, so the wrangler here asked me to see if I could split the job in tasks, to fasten things up. My script is actually looping from start frame to end frame, so all I need is a way to pass tasks frame ranges to my Draft template, via the job_plugin_info or elsewhere, cause till now, each task is doing the entire job.

Thanks
Maxime

Ah, gotcha. So the current Draft plugin wasn’t made with multi-task jobs in mind, so this won’t quite work out of the box. This is something that’s been on our wishlist for a while, but I just haven’t been able to get to it.

I think it should be simple enough to make modifications to the Draft plugin if you want to do it yourself, though. The function you’ll need to change is the “RenderArguments” function inside of the Draft plugin script (located at ‘plugins/Draft/Draft.py’ in your repo). This is where the plugin builds up the arguments to pass to the Draft script itself. Normally, it just takes in the script arguments that were built up by the submitter and passes them through, but you’ll want to modify the frame range based on the current task.

As long as you’ve set the job up with the correct Task Frame Ranges (ie, set the Job’s FrameList and ChunkSize appropriately) on submission, you should be able to use GetStartFrame() and GetEndFrame() in the Plugin to get the frame range for the current Task.

So really, the only change you’d have to do would be to add something like this in the RenderArgument() function, when it’s building up the args:

#Add the current Task's frame list to arguments
argsList.append( "%s=%s" % ("taskStartFrame", GetStartFrame()) )
argsList.append( "%s=%s" % ("taskEndFrame", GetEndFrame()) )

You’ll then just have to make sure that your template uses the ‘taskStartFrame’ and ‘taskEndFrame’ arguments.

Hope this helps!
Cheers,

  • Jon

Thanks. It worked perfectly!

Privacy | Site terms | Cookie preferences