From: Kevin Sallee <kevinsallee@(email surpressed)>
Subject: Re: Newbie submit script not working
   Date: Mon, 24 Oct 2011 18:54:52 -0400
Msg# 2137
View Complete Thread (23 articles) | All Threads
Last Next
On 10/24/2011 05:35 PM, Greg Ercolano wrote:
On 10/24/11 15:23, Kevin Sallee wrote:
On 10/24/2011 05:20 PM, Greg Ercolano wrote:
On 10/24/11 15:08, Kevin Sallee wrote:
[..]
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"

Ok that's a great answer! thank you very much, i'm gonna try it right
away :)

	Great.. and feel free to keep progress updated on the thread,
	which I've cc'ed here.

	BTW, note you can get one script to do both the submit and render;
	just add a special flag (eg. -render) which the 'submit' part of
	the script can specify as the command it sends to rush, so when
	the script runs on the render nodes, it runs a different part of
	the script to handle the rendering.

	It's a cool way of getting one script to do the work of two.

It will be a good idea for rendering scripts, but we're kind of using rush just to send other kind of jobs to the farm. This is a geometry baking job that will be introduced between animation and ligthing/texturing

	This is a special form of "recursion" that you have to handle
	carefully, otherwise you'll end up with a 'network worm' where
	you create a job that submits jobs..!

	You can end up with that situation even with two scripts, where
	you accidentally submit a job that runs the submitter script
	instead of the render script.

	To prevent that, add some code in your submit code as follows
	to protect it from accidentally being run as if it were a render.

	The daemons always set the RUSH_ISDAEMON variable before running
	a render, so you can check this variable just before submitting
	the job to "short-circuit" such a problem before it goes out of
	control. eg:

if os.environ.is_key("RUSH_ISDAEMON"):
     print "Avoiding recursion: exiting"
     sys.exit(1)
else:
     # Submit the job
     submit = os.popen("rush -submit", 'w')
     [..]

Yeah i saw that in the original script and kept that part of it for the moment, but as i said this job will probably not do renders.


So I tried to specify my environment vars but it doesn't seem to be working.

if i do something like this:

#!/usr/bin/env python
import os, commands, sys
os.environ["PATH"] = "/usr/autodesk/maya/bin"
os.environ["MAYA_LOCATION"] = "/usr/autodesk/maya"
os.environ["MAYA_PLUG_IN_PATH"] = "/mnt/springfield/.coatlicue/maya/plugins:/opt/pixar/RenderManStudio/plug-ins:/opt/bakery/licenses/relight-1.1.2.7_22217/plugins/maya_2011:/usr/local/alembic-1.0.2/maya/plug-ins" os.system("maya -batch -file /home/kevinsallee/alembicTests/testbatch.mb -command 'AbcExport -v -jobArg \"-ro -uvWrite -frameRange 1 20 -file /home/kevinsallee/alembicTests/testbatch.abc\";'")

he doesn't find maya, and neither does he find AbcExport.


For the moment i managed to do it by doing it like this:

#!/usr/bin/env python
import os, commands, sys
#os.environ["PATH"] = "/usr/autodesk/maya/bin"
#os.environ["MAYA_LOCATION"] = "/usr/autodesk/maya"
#os.environ["MAYA_PLUG_IN_PATH"] = "/mnt/springfield/.coatlicue/maya/plugins:/opt/pixar/RenderManStudio/plug-ins:/opt/bakery/licenses/relight-1.1.2.7_22217/plugins/maya_2011:/usr/local/alembic-1.0.2/maya/plug-ins" os.system("/usr/autodesk/maya/bin/maya -batch -file /home/kevinsallee/alembicTests/testbatch.mb -command 'loadPlugin \"/mnt/springfield/.coatlicue/maya/plugins/AbcExport.so\"; AbcExport -v -jobArg \"-ro -uvWrite -frameRange 1 20 -file /home/kevinsallee/alembicTests/testbatch.abc\";'")

which isn't very clean for me, but hey, for the moment it works. I don't understand why it's not taking into account my environment vars.

thanks for the help

kevin


Last Next