I’ve been using lens shaders a lot recently and I wanted to share this MEL script patch I created for the Mental Ray for Maya Physical Sky & Sun system. The update fixes an issue where the default physical sky & sun system will overwrite any existing lens shaders connected to a camera in Maya. With this script update you can drag a lens shader onto a camera in your physical sky & sun scene and select the “default” connection option without having to worry about the existing node connections.
The update moves the physical sky & sun node connections from the first lens shader input “.miLensShader” to the lens shader array connection “.miLensShaderList”.
MEL Script Download
Modified copies of the Maya 2010-2014 physical sky scripts are included in the ZIP archive.
Open the folder that matches your current Maya version.
Place the updated MEL scripts files “AEmia_physicalskyTemplate.mel” and “createMentalRayIndirectLightingTab.mel” in your user account’s Maya scripts folder.
Windows MEL script folder path:
Mac OS X MEL script folder path:
Linux MEL script folder path:
When the mel script is placed in your personal Maya scripts folder it will override the Maya default MEL script of the same name.