Reducing Keys using Filters
This topic shows how to reduce keys using filters. To follow the instructions, download
the file and script from http://area.autodesk.com/downloads/scripts/motionbuilder-animation-scripts.
- Open the filters_key_reducer.fbx file in MotionBuilder. The cube's FCurves appear as shown in the following figure.
- Run the filters_constant_key_reducer.py script to reduce the constant keys on the FCurve. The x FCurve for translation is
modified as shown in the following figure.
Following are the points to keep in mind:
- FBFilterManager() is the entrance to all filters.
- FBFilterManager().CreateFilter ('Constant Key Reducer') creates a constant key reducer.
- A filter always has two inputs: start time and stop time.
- lFilter.Apply (lModel.Translation.GetAnimationNode(), True) applies the filter to the model’s animation node.
Follow these instructions to retain the FCurve shape.
- Open the filters_key_reducer.fbx file in MotionBuilder. The FCurves appear as shown in the following figure.
- Run the filters_key_reducer.py script to reduce the keys on the FCurves. The shape does not change as shown in the
following figure.