Hey all! First post here.
I'm new to MEL scripting, but I've made a script that is supposed to set up all my global render settings. The problem is that once I do this, my Render Settings window no longer loads. It will come up, but it is just blank (here's what it looks like: http://tinypic.com/m/iz52cg/2). I saw another thread where the solution is to use the command "deleteUI unifiedRenderGlobalsWindow;" followed by "buildNewSceneUI;". However, I haven't had any luck with this solution, when I run those commands then try to relaunch the Render Settings window, I get the same blank window and Maya tells me it can't find the window. Specifically:
// Error: file: C:/Program Files/Autodesk/Maya2015/scripts/others/unifiedRenderGlobalsWindow.mel line 1074: setParent: Object 'unifiedRenderGlobalsWindow' not found. // // Error: file: C:/Program Files/Autodesk/Maya2015/scripts/others/createMayaSoftwareCommonGlobalsTab.mel line 380: Item not found: //
I believe something in my script broke the UI, but I can't seem to find what, and I suppose I don't really know what to look for. It's been driving me nuts, any help would be much appreciated.
Here's my script for reference:
//select -r defaultRenderGlobals;
string $shotCam[] = camera -name "renderCam" -centerOfInterest 5 -focalLength 35 -lensSqueezeRatio 1 -cameraScale 1 -horizontalFilmAperture 1.41732 -horizontalFilmOffset 0 -verticalFilmAperture 0.94488 -verticalFilmOffset 0 -filmFit Fill -overscan 1.15 -motionBlur 0 -shutterAngle 144 -nearClipPlane 0.1 -farClipPlane 10000 -orthographic 0 -orthographicWidth 30 -panZoomEnabled 0 -horizontalPan 0 -verticalPan 0 -zoom 1; objectMoveCommand; cameraMakeNode 1 "";
setAttr ($shotCam[0] + ".displayResolution") 1;
setAttr ($shotCam[0] + ".locatorScale") 5;
setAttr ($shotCam[0] + ".horizontalFilmAperture") ((getAttr ($shotCam[0] + ".verticalFilmAperture"))*1.778);
playbackOptions -animationStartTime 1 -minTime 1 -maxTime 200 -animationEndTime 200;
pluginInfo -edit -autoload true "C:/Program Files/Autodesk/mentalrayForMaya2015/plug-ins/Mayatomr.mll";
setAttr "defaultRenderGlobals.currentRenderer" -type "string" "mentalRay";
setAttr "defaultRenderGlobals.colorProfileEnabled" 1;
setAttr "defaultRenderGlobals.inputColorProfile" 2;
setAttr "defaultRenderGlobals.outputColorProfile" 1;
setAttr "defaultRenderGlobals.imageFormat" 20;
setAttr "defaultRenderGlobals.outFormatControl" 0;
setAttr "defaultRenderGlobals.animation" 1;
setAttr "defaultRenderGlobals.animationRange" 0;
setAttr "defaultRenderGlobals.putFrameBeforeExt" 1;
setAttr "defaultRenderGlobals.extensionPadding" 4;
setAttr "defaultRenderGlobals.periodInExt" 1;
int $minTime = playbackOptions -q -minTime;
setAttr "defaultRenderGlobals.startFrame" $minTime;
int $maxTime = playbackOptions -q -maxTime;
setAttr "defaultRenderGlobals.endFrame" $maxTime;
setAttr ($shotCam[0] + ".renderable") 1;
setAttr "perspShape.renderable" 0;
setAttr "defaultResolution.width" 960;
setAttr "defaultResolution.height" 540;
setAttr "defaultRenderGlobals.enableDefaultLight" 0;
setAttr "miDefaultOptions.miSamplesQualityR" 0.2;
setAttr "miDefaultOptions.maxReflectionRays" 1;
setAttr "miDefaultOptions.maxRefractionRays" 1;
setAttr "miDefaultOptions.maxRayDepth" 2;
setAttr "defaultViewColorManager.imageColorProfile" 3;
setAttr "defaultViewColorManager.displayColorProfile" 2;
select -r $shotCam[0];
lookThroughModelPanelClipped $shotCam[0] modelPanel4 0.001 1000;