Author Topic: Submit Maya Arguments for Qube GUI  (Read 8266 times)

thobry

  • Jr. Member
  • **
  • Posts: 4
Submit Maya Arguments for Qube GUI
« on: March 01, 2012, 09:00:53 PM »
Where can I find the list of arguments to auto populate the GUI window that pops up when using the standard maya submit menu?

Would this have to do with the --submitDict (submit dictionary)?

I figured out these ones:
 'priority':'1000',
 'cpus':'85',
 'reservations':'host.processors=4, global.mr=1',

...but I want to have "retry failed frames" number, etc, but I dont know that that attribute/argument is called.

Also, can you feed ENV VARS?

This is the mel command that I want to modify that comes with Qube and shows up in Maya;

system("start \""+`qube_get_qubeguiPath`+"\"  --submitDict \"{'name':'maya render "+`file -q -sn -shn`+"', 'prototype':'maya', 'package':{'scenefile':'"+`file -q -sn`+"', 'project':'"+`workspace -q -rd`+"', 'range':'"+`getAttr defaultRenderGlobals.startFrame`+"-"+`getAttr defaultRenderGlobals.endFrame`+"', 'cameras_all':'"+stringArrayToString(`listCameras -p -o`, " ")+"', 'renderers_all':'"+stringArrayToString(`renderer -q -ava`, " ")+"', 'layers_all':'"+stringArrayToString(`ls -type renderLayer`, " ")+"'}}\" ");

jburk

  • Administrator
  • *****
  • Posts: 493
Re: Submit Maya Arguments for Qube GUI
« Reply #1 on: March 02, 2012, 08:21:17 PM »
The quickest way would be to inspect a maya job that's already run on your farm - see the section below where I inspect job id 256:

You can also view full documentation on the Qb* python object classes by unzipping:

$QBDIR/docs/API_Python_Html.zip

and loading up the index.html in the unzipped directory in a browser.  This will give you some info on what each one of these job attributes are used for.  Many of them are read-only and set by or on the supervisor once the job is submitted (eg, you can't pass in a job['id'] when you're submitting a job).

Note that the example you've posted uses the Maya jobtype, which doesn't expose MEL commands to the front end; Maya is started in a perl interpreter, and the maya jobtype backend sends MEL commands to the maya prompt.  Any MEL in the submitDict is run during submission on the client in order to build the submitDict inside the submitting user's Maya and populate the submission UI.


jburk-17-mbPro:helloWorld jburk$ python
Python 2.5.4 (r254:67916, Aug  1 2011, 15:52:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Code: [Select]
>>> import qb
>>> import pprint as pp
>>> info = qb.jobinfo(id=256)[0]
>>> pp.pprint(sorted(info.keys()))
['account',
 'agenda_timeout',
 'agendastatus',
 'cluster',
 'cpus',
 'cpustally',
 'cwd',
 'data',
 'dependency',
 'domain',
 'drivemap',
 'env',
 'flags',
 'flagsstring',
 'globalorder',
 'groups',
 'hostorder',
 'hosts',
 'id',
 'kind',
 'label',
 'lastupdate',
 'localorder',
 'mailaddress',
 'name',
 'notes',
 'omitgroups',
 'omithosts',
 'p_agenda_cpus',
 'p_agenda_priority',
 'package',
 'path',
 'pathmap',
 'pgrp',
 'pid',
 'priority',
 'prototype',
 'queue',
 'reason',
 'requirements',
 'reservations',
 'restrictions',
 'retrysubjob',
 'retrywork',
 'retrywork_delay',
 'serverid',
 'status',
 'subjobstatus',
 'timecomplete',
 'timeout',
 'timestart',
 'timesubmit',
 'todo',
 'todotally',
 'user']


>>> pp.pprint(info['package'])
{'cameras_all': 'front persp side top',
 'frameCount': '10',
 'layers_all': 'defaultRenderLayer',
 'project': '/Users/jburk/Documents/maya/projects/default/',
 'range': '1-10',
 'rangeExecution': 'individual',
 'renderers_all': 'mayaSoftware mayaHardware mentalRay',
 'scenefile': '/Users/jburk/Documents/maya/projects/default/scenes/test2011.mb'}