Daniel Browne wrote:
> In essence this is what I was thinking of; internalizing the rush submit in=
> Maya's python environment.
>
> I wasn't ware of the -field parameter; I could try that instead.
Yes, that's the intended use.
However, I should make the submit scripts importable.
I just got it to import by making two changes to the script:
1) Renaming the script from submit-maya.py to submit_maya.py.
(The python import command doesn't like the dash in the name)
[EDIT 04/12/11] -- Doing this involves changing this line
at the top of the submit_maya.py script:
BEFORE: Rush.SetProgName("submit-maya")
AFTER: Rush.SetProgName("submit_maya") # underbar!
2) Adding this above the '### MAIN' section, and indenting that section:
if __name__ == "__main__":
so eg:
---- snip
###
### MAIN
###
if __name__ == "__main__":
ret = 0
i = 1
while i < len(sys.argv):
if ( sys.argv[i] == "-submit" ): MAIN_Submit()
elif ( sys.argv[i] == "-render" ): MAIN_Render()
[..]
---- snip
With those changes, I can import the script and bring up the GUI
from the python interpreter, and submit a job, eg:
$ python
Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import submit_maya
>>> submit_maya.MAIN_Input()
With this in mind, I'll try to redesign the script a little bit
so that MAIN_Input() can accept an optional dict of presets.
Hadn't really designed the script to be used this way, but I see
where that could be quite handy.
I've been working on the python submit-maya script, getting it up
to date with the "Layers And Frames" stuff mentioned in this article
for the perl version:
http://seriss.com/cgi-bin/rush/newsgroup-threaded.cgi?-view+2059+2059+2060
I should have a new python submit_maya script in a day or so
that will have those features, as well as being 'importable'.
I'll follow up in this thread with details.
--
Greg Ercolano, erco@(email surpressed)
Seriss Corporation
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)ext.23
Fax: (Tel# suppressed)
Cel: (Tel# suppressed)
|