Using a script as Maya executable

Hi!

I need to run a wrapper around maya’s Render.exe (in the MayaCmd plugin) so I can setup the environment correctly (we’ve got a centralized vray installation and Render.exe needs to find that (and it ignores userSetup.py…)). So I wrote a bat script that will do the job, but Deadline is really picky about what it accepts as a valid render executable… Is there anyway around this problem through Deadline?

(The reason we’d like to use MayaCmd is that it might give us more feedback on a render problem we’re having than the MayaBatch plugin).

Cheers,
SebastianH

Hello,

So the only thing you are missing here is that under maya version in the submitter, where it would say 32 bit or 64 bit, you need to set it to none. That should make this work like a charm.

Hi,

I’m bumping this thread because I’ve started today testing Deadline for a Studio, and we are having a problem with this. With Softimage everything is working fine, actually I think that the same thing you are doing with the workgroups in the Softimage submitter could be veeeeeery helpfull if added to the Maya Submitter (autodetect the Env in the session, fill the fields, and leave them editable to add modifications per job), that would really solve our problem.

As long as we put the env in to the jobs everything works fine but, the wrapper thing we cannot make it to work. Probably there is something wrong on our wrapper file, this is a very simplified version of the launcher wrapper we use for Maya to launch and adapted to Mayabatch:

[code]@echo off

rem -----------------MAYA Environment Variables----------------------------------
set MAYA_APP_DIR=\192.XXX.X.XX\Path\to_Software\Application\prefs\ren
set MAYA_MODULE_PATH=%MAYA_MODULE_PATH%;\192.XXX.X.XX\Path\to_Software\Application\modules

rem -----------------START MAYA----------------------------------
start “” “C:\Program Files\Autodesk\maya2016\bin\mayabatch.exe”[/code]

If somebody can put some light on this it would be nice.

Thanks in advance!

That certainly looks fine to me. What is the problem you’re actually having? Does send a job report make sense in this context?

Hi,

this is the log:

[code]=======================================================
Error

Error: Monitored managed process “MayaBatch” has exited or been terminated.
at Deadline.Plugins.ScriptPlugin.RenderTasks(String taskId, Int32 startFrame, Int32 endFrame, String& outMessage, AbortLevel& abortLevel)

Type

RenderPluginException

Stack Trace

at Deadline.Plugins.Plugin.RenderTask(String taskId, Int32 startFrame, Int32 endFrame)
at Deadline.Slaves.SlaveRenderThread.a(TaskLogWriter A_0)

=======================================================
Log

2016-04-28 10:45:27: BEGIN - WORK03PM\infected
2016-04-28 10:45:27: 0: Start Job timeout is disabled.
2016-04-28 10:45:27: 0: Task timeout is disabled.
2016-04-28 10:45:27: 0: Loaded job: _3DMayatst_Sh002_Render_v005_Arnold_fnc - RenderCam (5721cc0fc8247507d4b85400)
2016-04-28 10:45:27: 0: INFO: Executing plugin script C:\Users\infected\AppData\Local\Thinkbox\Deadline7\slave\work03pm\plugins\5721cc0fc8247507d4b85400\MayaBatch.py
2016-04-28 10:45:27: 0: INFO: About: Maya Batch Plugin for Deadline
2016-04-28 10:45:27: 0: INFO: The job’s environment will be merged with the current environment before rendering
2016-04-28 10:45:27: 0: INFO: Rendering with Maya version 2016.0
2016-04-28 10:45:27: 0: INFO: Setting MAYA_DISABLE_CIP (ADSK Customer Involvement Program) environment variable to 1 for this session
2016-04-28 10:45:27: 0: INFO: Setting MAYA_DISABLE_CER (ADSK Customer Error Reporting) environment variable to 1 for this session
2016-04-28 10:45:27: 0: INFO: Not enforcing a build of Maya
2016-04-28 10:45:27: 0: INFO: Starting monitored managed process MayaBatch
2016-04-28 10:45:27: 0: INFO: Stdout Redirection Enabled: True
2016-04-28 10:45:27: 0: INFO: Stdout Handling Enabled: True
2016-04-28 10:45:27: 0: INFO: Popup Handling Enabled: True
2016-04-28 10:45:27: 0: INFO: QT Popup Handling Enabled: False
2016-04-28 10:45:27: 0: INFO: WindowsForms10.Window.8.app.* Popup Handling Enabled: False
2016-04-28 10:45:27: 0: INFO: Using Process Tree: True
2016-04-28 10:45:27: 0: INFO: Hiding DOS Window: True
2016-04-28 10:45:27: 0: INFO: Creating New Console: False
2016-04-28 10:45:27: 0: INFO: Running as user: infected
2016-04-28 10:45:27: 0: INFO: Not enforcing a build of Maya
2016-04-28 10:45:27: 0: INFO: Executable: “X:\04_Software\33_Maya\02_launchers\Mayabatch.bat”
2016-04-28 10:45:27: 0: INFO: Argument: -prompt -file “S:_3D_MayaTest_XXXXXX\06_3D\01_Setups\03_Maya\Render_3DMayatst_Sh002_Render\scenes_3DMayatst_Sh002_Render_v005_Arnold_fnc.mb” -proj “S:/_3D_MayaTest_XXXXXX/06_3D/01_Setups/03_Maya/Render/_3DMayatst_Sh002_Render”
2016-04-28 10:45:27: 0: INFO: Startup Directory: “X:\04_Software\33_Maya\02_launchers”
2016-04-28 10:45:27: 0: INFO: Process Priority: BelowNormal
2016-04-28 10:45:27: 0: INFO: Process Affinity: default
2016-04-28 10:45:27: 0: INFO: Process is now running
2016-04-28 10:45:27: 0: Plugin rendering frame(s): 1
2016-04-28 10:45:27: 0: INFO: Waiting until maya is ready to go
2016-04-28 10:45:27: 0: WARNING: Cannot write stdin to process because it is no longer running
2016-04-28 10:45:27: 0: WARNING: Monitored managed process MayaBatch is no longer running
[/code]

Thanks again!

Oooh! I missed this previously. You’re not passing arguments to Maya. Throw a “%*” at the end of your executable line:

rem -----------------START MAYA----------------------------------
"C:\Program Files\Autodesk\maya2016\bin\mayabatch.exe" %*

stackoverflow.com/a/26702/187769