Maya submission defaults

Hey guys,

We’ve found (through some trial and error) that we get the best Mental Ray results if we do the following settings in the Maya submitter window:

  • Untick “Use MayaBatch plugin”
  • Set the following arguments “-aml -at -rt 16”

Is there any way to store these default settings so that the Maya integrated submitter, and the Deadline monitor submitter, use them automatically?

Cheers,
Daniel

Hi,
Couple of ways to achieve the desired result.

  1. You could copy the various submission scripts to another location, such as under the “custom” directory on the repository and hack away to make it hard-wired to your custom, studio requirements.

  2. You could create a Maya sanity check script to apply the Maya in-app submission settings as you prefer. See here for example, more info: thinkboxsoftware.com/deadlin … nity_Check

  3. For the monitor submission, you can take a copy of the Maya monitor submission python script from here:
    [DeadlineRepositoryPath]/scripts/Submission/MayaSubmission.py
    and copy it into:
    [DeadlineRepositoryPath]/custom/scripts/Submission/MayaSubmission.py
    and then changes the lines as follows:

[code]BEFORE:
mayaBatchBox = scriptDialog.AddSelectionControl( “MayaBatchBox”, “CheckBoxControl”, True, “Use MayaBatch Plugin”, labelWidth, -1, “This uses the MayaBatch plugin. It keeps the scene loaded in memory between frames, which reduces the overhead of rendering the job.” )

AFTER:
mayaBatchBox = scriptDialog.AddSelectionControl( “MayaBatchBox”, “CheckBoxControl”, False, “Use MayaBatch Plugin”, labelWidth, -1, “This uses the MayaBatch plugin. It keeps the scene loaded in memory between frames, which reduces the overhead of rendering the job.” )

BEFORE:
scriptDialog.AddControl( “CommandLineBox”, “TextControl”, “”, dialogWidth - labelWidth - 24, -1 )

AFTER:
scriptDialog.AddControl( “CommandLineBox”, “TextControl”, “-aml -at -rt 16”, dialogWidth - labelWidth - 24, -1 )[/code]

If you would like these settings to be remembered between sessions of the monitor UI being open, then it would just be a case of adding the control’s name such as “CommandLineBox” to the settings list:

[code]BEFORE:
settings = (“DepartmentBox”,“CategoryBox”,“PoolBox”,“SecondaryPoolBox”,“GroupBox”,“PriorityBox”,“MachineLimitBox”,“IsBlacklistBox”,“MachineListBox”,“LimitGroupBox”,“SceneBox”,“FramesBox”,“ChunkSizeBox”,“VersionBox”,“BuildBox”,“ProjectBox”, “OutputBox”, “RendererBox”, “SubmitSceneBox”, “MayaBatchBox”,“LocalRenderingBox”,“CpusBox”,“StrictErrorCheckingBox”,“StartupScriptBox”)
scriptDialog.LoadSettings( GetSettingsFilename(), settings )

AFTER:
settings = (“DepartmentBox”,“CategoryBox”,“PoolBox”,“SecondaryPoolBox”,“GroupBox”,“PriorityBox”,“MachineLimitBox”,“IsBlacklistBox”,“MachineListBox”,“LimitGroupBox”,“SceneBox”,“FramesBox”,“ChunkSizeBox”,“VersionBox”,“BuildBox”,“ProjectBox”, “OutputBox”, “RendererBox”, “SubmitSceneBox”, “MayaBatchBox”,“LocalRenderingBox”,“CpusBox”,“StrictErrorCheckingBox”,“StartupScriptBox”,“CommandLineBox”)
scriptDialog.LoadSettings( GetSettingsFilename(), settings )[/code]

Thanks Mike, for that very detailed reply!

I’ll let you know how we go :slight_smile:

Cheers,
Daniel

Update:

I ended up using a CustomSanityChecks.mel script for the built-in Maya submitter and a /custom/scripts/Submission/MayaSubmission.py alteration for the Monitor submission.

As a side note, I found the docs/example for the CustomSanityChecks.mel integration a little bit misleading. The website says:

while the SubmitMayaToDeadline.mel script is actually looking here:

The example also used the $renderer variable for some conditions, but I found that $renderer is only assigned after the CustomSanityChecks.mel script is sourced. The fix was simple, just use the GetCurrentRenderer()function that the $renderer is relying on, but still worth mentioning :slight_smile:

The CustomSanityChecks.mel file then looks like this:

if (GetCurrentRenderer() == "mentalRay") { setAttr defaultRenderGlobals.deadlineUseMayaBatchPlugin 0; setAttr defaultRenderGlobals.deadlineMayaArgs -type "string" "-aml -at -rt 16"; } else { setAttr defaultRenderGlobals.deadlineUseMayaBatchPlugin 1; setAttr defaultRenderGlobals.deadlineMayaArgs -type "string" ""; }

Thanks again!

Cheers,
Daniel

1 Like

Thanks Daniel. These typos were discovered shortly after Deadline v6.1 shipped and have already been fixed internally ready for Deadline v6.2.
Thanks for the feedback, very much appreciated!
Mike