From: Kevin Sallee <kevinsallee@(email surpressed)> Subject: Newbie submit script not working Date: Mon, 24 Oct 2011 18:08:04 -0400 |
Msg# 2134 View Complete Thread (2 articles) | All Threads Last Next |
Once again forget about my last messages! I'm sorry about the spamming
but i'm finding some answers by myself along the way.
Ok, so i managed to call a script that should execute a maya batch command. so i still have my main file that contains: # Submit the job submit = os.popen("rush -submit", 'w') submit.write('title SHOW/SHOT\n' + 'ram 250\n' + 'frames 1-1\n' + 'logdir %s\n' % logdir +'command python /home/kevinsallee/alembicTests/myTest.py\n ' + 'cpus +any=5@1\n') err = submit.close() and myTest.py contains: #!/usr/bin/env python import os, commands, sysos.system("/usr/autodesk/maya/bin/maya -batch -file /home/kevinsallee/alembicTests/testbatch.mb -command 'AbcExport -v -jobArg \"-ro -uvWrite -frameRange 1 20 -file /home/kevinsallee/alembicTests/testbatch.abc\"'") AbcExport is an Alembic command that comes in the maya plugin AbcExport.so, which i put in the main plug ins folder of maya. If i run this, my log shows this: Error: Error: Syntax error File read in 0 seconds. Result: /home/kevinsallee/alembicTests/testbatch.mb Error: Cannot find procedure "AbcExport".So it seems it's not finding the plugins. where should i specify the path for the plugins? thank you kevin |
From: Greg Ercolano <erco@(email surpressed)> Subject: Re: Newbie submit script not working Date: Mon, 24 Oct 2011 18:20:35 -0400 |
Msg# 2135 View Complete Thread (2 articles) | All Threads Last Next |
On 10/24/11 15:08, Kevin Sallee wrote: > Once again forget about my last messages! I'm sorry about the spamming > but i'm finding some answers by myself along the way. LOL, that's good.. makes our job easier, and we get to learn with you ;) > so i still have my main file that contains: > [..] > 'command python /home/kevinsallee/alembicTests/myTest.py\n ' + Right; you might want to pass the scene file's name and other things as arguments to the script, so you don't have to hardcode the MyTest.py render script, but perhaps that's for later. > and myTest.py contains: > #!/usr/bin/env python > import os, commands, sys > os.system("/usr/autodesk/maya/bin/maya -batch -file /home/kevinsallee/alembicTests/testbatch.mb -command [..] Be sure to set any PATH and other environment variables in your script, eg: os.environ["PATH"] = "/usr/autodesk/maya/bin:" + os.environ["PATH"] > AbcExport is an Alembic command that comes in the maya plugin > AbcExport.so, which i put in the main plug ins folder of maya. > > If i run this, my log shows this: > Error: > Error: Syntax error > File read in 0 seconds. > Result: /home/kevinsallee/alembicTests/testbatch.mb > Error: Cannot find procedure "AbcExport". > > So it seems it's not finding the plugins. where should i specify the > path for the plugins? Probably a separate MAYA_PLUG_IN_PATH environment variable, eg: os.environ["MAYA_PLUG_IN_PATH"] = "/some/path/to/your/plugins" Take a look at your environment variables for a working unix shell command line test, and make sure any of those that are maya related are set in your MyTest.py script. -- 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) |