"submit-maya.pl" Patch for Maya 7.0 Rendering with Mentalray 
 08/05/2005

Description

    In Maya 7.0, the MEL variables whose names start with 'mentalrayGlobals.XXX' are apparently no longer honored, having been superceded by variables starting with 'defaultRenderGlobals.XXX'.

    As a result, using the 'mentalray' or 'mentalray-standalone' settings in submit-maya will cause each 'Rush frame' to render the entire scene, instead of the specified frame range.

      Note: you can use 'submit-maya6.pl' to work around this problem.. submit-maya6 does not have this problem, because it does not generate mel scripts to implement rendering with MentalRay. submit-maya6 works with both Maya 6.x and 7.x, no patches needed.

How To Determine If You Need The Patch

    You need the patch if you are running Rush 102.42a or older (102.42, 102.41, etc..), and are using the submit-maya.pl script that 'came with' the release.

    You can visually check the file to see if the patches below were applied (see BEFORE/AFTER table below)

Installing The Patch

    You can download this patched version of 102.42a's submit-maya to fix the problem. Just rename out your existing submit-maya.pl script, and install this one in its place (being sure to preserve any customizations you made to the environment variables at the top).

    Or, if you just want to fix your existing submit-maya.pl script by hand, you can make the following simple modifications to your existing submit-maya.pl in a text editor. Be sure to change all occurrances of these lines throughout the file:

      BEFORE
      submit-maya.pl before patch applied: Find these lines:
      
      // Init mray globals
      setAttr "mentalrayGlobals.startFrame"     $opt{sfrm};
      setAttr "mentalrayGlobals.endFrame"       $opt{efrm};
      setAttr "mentalrayGlobals.byFrame"        1;         
      setAttr "mentalrayGlobals.startExtension" $opt{sfrm};
      setAttr "mentalrayGlobals.byExtension"    1;         
                
      AFTER
      ..and replace them with these lines:
      
      // Init mray globals
      //
      // Maya 6.x and older                                  // Maya 7.x and up
      // ------------------                                  // ---------------
      setAttr "mentalrayGlobals.startFrame"     $opt{sfrm};  setAttr "defaultRenderGlobals.startFrame"     $opt{sfrm};
      setAttr "mentalrayGlobals.endFrame"       $opt{efrm};  setAttr "defaultRenderGlobals.endFrame"       $opt{efrm};
      setAttr "mentalrayGlobals.byFrame"        1;           setAttr "defaultRenderGlobals.byFrame"        1;
      setAttr "mentalrayGlobals.startExtension" $opt{sfrm};  setAttr "defaultRenderGlobals.startExtension" $opt{sfrm};
      setAttr "mentalrayGlobals.byExtension"    1;           setAttr "defaultRenderGlobals.byExtension"    1;
                

This change will ensure the submit-maya.pl script works for both Maya 6.x and 7.x.