Modo Scripts
mm_TargetedMotionBaker
Posted by on Saturday, April 05, 2008 (GST)
mm_TargetedMotionBaker v1.0
 
*** Important Requirements for Windows users: This script require access to python libraries that are not shipped by default with Modo in Windows. You will need to install  a full distribution of Python 2.4.3 (not Python 2.5) such as the one from ActiveState ***
 
 
 
Zip contains:
  • mm_TargetedMotionBaker.py

    Goes in your Modo user scripts directory:

   
    OSX: /Users/YourUserNameLibrary/Application Support/Luxology/Scripts
 
    Wndows: C:\Documents and Settings\YourUserName\Application Data\Luxology\Scripts
 
 
What is it?
 
mm_TargetedMotionBaker will bake out the motion channels of a targeted camera so that they may be exported or copied to another item. The script is designed to work around a couple of known limitations of the targeting in Modo 302.
 
First, it is only possible to target cameras and lights. It is not possible to target objects. By setting up a camera proxy for the object and targeting that, you can bake out it's motion and copy the rotation channels to the object. You could use this method to target a gun turret, for example.
 
Secondly, it is not possible to parent an item to a targeted camera or light and have the child item inherit the parent's rotation.
 
The script operates on the currently selected camera in the item list, so you need to manualy select the camera that is targeted by left clicking on it with the mouse. It will create a new camera in the item list called 'BakedCamera' and bakes the rotation and translation channels of the source camera to 'BakedCamera.
 
 
Usage:
 
Set up your targeted Camera. Make sure, and this is important, that you have one, and one only, 3D viewport open. The best way to assure this is to have the default 302 animation tab open. Set the viewport to the camera that is targeted. IE you need to be looking through the targeted camera. Select the camera in the item list. Run the script, either from a hotkey, menu, or by hitting F6 and locating it in the file dialog. A new camera will be created in the item list called 'BakedCamera'. You can now export the motion, or copy selected channels to your object. When you are finished you are free to delete the 'BakedCamera' item. If you subsequently edit the motion of the original camera etc, just re-run the script.