PipelineFX Forum
Qube! => Developer Customization => Topic started by: purest on February 21, 2012, 02:22:29 PM
-
Hi everyone,
I am writing a script to submit a texture prepping job to the farm.
I would like to have the job run a number of tasks, but they are not frames with frame numbers, rather passes, with pass names.
I want to do something like:
# job properties:
job = {}
job['name'] = 'my job'
job['prototype'] = 'cmdrange'
# package properties:
job['package'] = {}
job['package']['cmdline'] = '"doPrepWith QB_PASS"'
job['package']['frameCount']=6
# setting 'agenda' to get tasks
agenda = ["dif","spec","dirt","colour","matt","bmp"]
job['agenda'] = agenda
ListOfSubmittedJobs = qb.submit([job])
is this possible?
-
Yes, but you'll have to write your own backend and not use the cmdrange jobtype.
This is easier than it sounds, and you might want to check out the "helloWorld" jobtype in $QBDIR/examples/python/types/helloWorld/. The README there has instructions on how to develop, test, and get your jobtype showing up on the farm.
Build your agenda like:
agenda = []
for i in ["dif","spec","dirt","colour","matt","bmp"]:
work = {'name': i}
agenda.append(work)
job['agenda'] = agenda
All agenda items must have at least the 'name' key/value defined; for cmdrange jobs, the 'name' is the frame number.
Then in your backend (the execute.py) in the executeWork() loop, when you get an agenda item from the supervisor with qb.requestwork(), the pass name will be:
work = qb.requestwork()
passName = work['name']
-
that's great,
thanks for your help - just got it working.
R