Submit a job to run Maya Python

Hi,

I want to submit a job where I run maya python command per frame, but not render anything. What plugin should I use and how can I go about doing this?

Thanks,

Would Maya ScriptJob work? If it’s something that can be saved into the scene I’d call Maya Python, do the change and save it there instead.

If you don’t actually need a distributed task, but can handle all the things you’re wanting to do via a single task, you can effectively use a Command Line job calling mayabatch.

We use this extensively for asset processing:

1 Like

Ah, ok. Will try these suggestions. Thanks!

Good luck :slight_smile:

Keep in mind that your melScript.mel hook can load a python module, which is what I usually do. It’s just that the command line parameters don’t support Py at the moment (or possibly ever).

Eg., this is the relevant part ripped from our main checkin hook:

// Load Python script for further processing
print("Loading Python module\n");
python "import maya_pipeline.checkin as checkin; checkin.process(pushDownstream=True)";

So in this particular example, you could have different MEL hooks for different levels of processing, passing relevant args to your desired python module(s).

2 Likes