Thank you very much Greg, it works perfectly.
That will even allows me to generate one file per layer to render.
One last thing, the "Be very Happy" window is still popping-up, which is
really nice :) , but annoying when I have several to close after I
launched several forms at a time. Any way to prevent this?
Thank you again for your precious help.
Stephan.
Greg Ercolano wrote:
Stephan Kosinski wrote:
I am using this kind of command to generate and submit maya render form:
submit-maya.pl -field JobTitle jobname -field ScenePath myScenePath
etc.....
It is really convenient since I can launch renders within maya but
would be even more convenient I didn't have to click on the "Submit"
button to launch the render on the farm.
Is there a way to auto-confirm the form so it goes to the farm as soon
as hit "enter" in my shell?
Yes. It should be as easy as:
perl //path/to/submit-maya.pl -submit /var/tmp/myfile.txt
..where the /var/tmp/myfile.txt contains the key/value pairs
of the submit form, which you can generate from within maya,
or from another script.
When you run that command, the job will go straight to the farm.
To do that, you can simulate what the submit script does when the
user hits the 'Submit' button, basically these two steps:
1) Save out a simple text file that contains the key/value pairs
for all the submit form's fields (see below)
2) Invoke the submit script with the arguments "-submit file"
where "file" is the pathname of the above text file. eg:
perl //path/to/submit-maya.pl -submit /var/tmp/myfile.txt
..where /var/tmp/myfile.txt is a file that contains key/value pairs
of all the submit fields.
When you submit a maya job, a copy of this key/value file
is saved in the user's home directory as:
UNIX: ~/.rush/.submit-maya-last
WINDOWS: c:\temp\.rush-<USERNAME>\.submit-maya-last
So for instance, to resubmit the last maya job you submitted,
under unix you might do:
perl //path/to/submit-maya.pl -submit ~/.rush/.submit-maya-last
To generate the key/value file yourself, you can nab a copy of the
one the rush submit form generates, and use that as a template in your
own script, changing the fields as you want (Frames:, Cpus:, etc).
It's important that the key/value file have the same fields the submit
script expects. Be aware that newer versions of the submit-maya script
sometimes have new fields, so your app would need to keep in sync with these.
What follows is a unix bash script that does this.
If you need an example in some other language, let me know.
Note you may need to modify the key/value data with one of your own
submit-maya-last files, and you'll need to change the pathname of
to the submit script for the location on your file server.
* * *
#!/bin/sh
### CREATE A KEY VALUE PAIR FILE
cat << EOF > /var/tmp/myfile.txt
AutoDump: off
BatchClip: yes
BatchFrames: 1
Cpus: +any=5
Debug: off
DoneMail:
DumpMail:
Frames: 1-10
ImageCommand:
ImageDirectory:
JobDoneCommand:
JobDumpCommand:
JobStartCommand:
JobTitle:
LicenseBehavior: Licpause+Retry
LogDirectory:
LogFlags: Overwrite
MaxLogSize: 0
MaxTime: 00:00:00
MaxTimeState: Que
MayaFlags:
MrayCommand: ray
MrayFlags:
MrayVerbosity: 5
NeverUseCpus:
PrintEnvironment: off
Project:
Ram: 1
Renderer: maya(sw)
Retries: 3
RetryBehavior: Fail
SaveMIDirectory:
ScenePath: //meade/net/tmp/scenes/foo.ma
StartIrush: yes
SubmitHosts:
SubmitOptions:
Threads: all
WaitFor:
WaitForState: Dump
_SAVE_ID: Maya-Submit
EOF
### NOW RUN THE SUBMIT-MAYA SCRIPT TO SUBMIT IT AS A JOB
perl //yourserver/rushscripts/submit-maya.pl -submit /var/tmp/myfile.txt
|