I tried to do something like this : job.JobBatchName(batchName)
but I get :
Event Error (OnJobSubmitted): TypeError : ‘unicode’ object is not callable
What am I missing ?
I tried to do something like this : job.JobBatchName(batchName)
but I get :
Event Error (OnJobSubmitted): TypeError : ‘unicode’ object is not callable
What am I missing ?
job.JobBatchName = batchName
is a possible solution, though I’m not sure you can change the batch name mid render…?
Yeah I thought since it’s not a function but a string, that would work, but it doesn’t really set it apparently. Maybe there is another function that I can use after doing that? something like jobInfoUpdate() ?
I thought I could do something like with job.SetJobPluginInfoKeyValue() But I can’t find an equivalent for deadline job info keys.
And yes I can change Batch name even mid render manually in the job properties > general. That’s why I’m trying to figure out a way to automate it.
UPDATE : I finally figured it out. you just need to save the job with repositoryUtils after modifying its properties. So in my case it was like this :
job.JobBatchName = batchName
RepositoryUtils.SaveJob(job)
I hope there will be more examples of scripting with deadline, that would help us a lot.
EDIT: updated as you have worked it out.
Yes, many many examples: github.com/ThinkboxSoftware/Dea … tom/events
Many blog posts over the years are on the subject of scripting in Deadline: deadline.thinkboxsoftware.com/feature-blog/
Deep-dive on Deadline with whole section on Scripting/developing in Deadline: slideshare.net/AmazonWebSer … eadlinepdf (2.5hr workshop at re:INVENT)
Docs: docs.thinkboxsoftware.com/produ … #scripting
Scripting API Overview: docs.thinkboxsoftware.com/produ … rview.html
App Plugin Overview: docs.thinkboxsoftware.com/produ … ugins.html
Event Plugins: docs.thinkboxsoftware.com/produ … ugins.html
Cloud Plugins: docs.thinkboxsoftware.com/produ … ugins.html
Monitor Scripting: docs.thinkboxsoftware.com/produ … ripts.html
Job Scripting: docs.thinkboxsoftware.com/produ … ripts.html
Web Service Scripting: docs.thinkboxsoftware.com/produ … ripts.html
Scripting API docs/examples: docs.thinkboxsoftware.com/produ … index.html
Standalone Python API: docs.thinkboxsoftware.com/produ … ython.html
HTTP RESTful API Overview: docs.thinkboxsoftware.com/produ … rview.html
Standalone Python EXAMPLES: docs.thinkboxsoftware.com/produ … index.html
Thank you Mike !
Actually I went through all the official doc links I could find on the thinkbox software website. The blog is interesting though, I should look into it more.
But I wasn’t aware of the github link, that one has very useful examples actually, for instance this one tackles a similar issue : github.com/ThinkboxSoftware/Dea … ideJobName
Thank you again for the great work and the constant support !
No worries. Happy rendering!