MAYA TO LIGHTWAVE CAMERA EXPORT
Made with Maya 2023
This MEL script exports camera animation (including position, rotation and focal length) from Maya to Lightwave to perfectly match scenes between them.
To exactly match animation curves, the script bakes the camera animation so you'll have a keyframe every frame.
The script exports a <camera name>.mot file and a <camera name>_focal_length.env file
INSTRUCTIONS
Maya:
1) Load the script into Maya Script Editor
2) Select the camera you want to export
3) Set render settings (Image Size Width and Height)
4) Device aspect ratio and film aspect ratio must have the same value (this because Maya keeps them separately and the focal length is calculated using film aspect ratio), so you have to change manually one of them in order to match render output and camera when import them into Nuke.
5) Execute the script
6) Select a folder where the files will be saved
7) Click on "Open" button
Lightwave:
Before loading .mot and .env files into Lightwave you have to manually change the following settings:
1) Open Preference panel and set the same frame per second as in Maya scene
2) Select the Camera and Load Motion File from Load drop menu
3) Open Camera Properties panel, click on the Lens Focal Length envelope (E), right click on CameraZoomFactor and select Replace to load .env file
3) Set Width, Height and Aspect as in Maya render settings (Lightwave Aspect = Maya Pixel aspect ratio)