Shopping Cart (0)

Animating Mental Ray for Maya Lens Shader Attributes

This blog post is a tip for Domemaster3D for Maya users. If you want to be able to keyframe animate Mental Ray lens shader attributes in Maya 2016+ you need to open the Maya Preferences window and disable parallel evaluation.

This is done by going to the Windows > Settings/Preferences > Preferences menu item.

In the Preferences window click on the Settings > Animation section on the left side of the view. Then in the main part of the preferences window under the Evaluation heading set the Evaluation mode to “DG”.

Click the Save button to accept these changes.

To place a keyframe on a lens shader attribute, select the “center_LatLong_Stereo” item in the Hypershade’s Utility tab.

Then open the Channel Box and right click on the attribute you want to animate. In the contextual menu select the Key Selected menu item.

Keyframing Lens Shaders Using MEL

If you want to use MEL scripting to manually set keyframes on the lens shader attributes you can use a code snippet like this: