For more information about the Custom mental ray text, see Custom mental ray text.
To assign a material shader (example)
The Custom Text Editor opens. For a description, see mental ray Custom text editor.
When selecting objects or shaders in Maya the editor is updated according to the selected entity and enable the appropriate control if the current selection allows creation and assignment of custom mi text.
The Attribute Editor displays the custom text user interface.
Any valid mi text can be entered and is stored once Apply is selected. Selecting Clear deletes the current text from the node and clears the text field.
The custom text can make use of special placeholder characters or strings that are recognized during translation. They are replaced by actual values on export. There are four custom text variables being supported, For more information, see Custom Text Variables.
After applying the text you should rename the node to some descriptive identifier, perhaps including a hint about the mode of application. Especially the shader text nodes should get a name that mentions their intended use because the Custom Shader Text section gathers all light, camera, material, and shader text nodes into one menu.