Go to: Synopsis. Return value. Keywords. Flags. MEL examples.

Synopsis

filterCurve [-cutoffFrequency float] [-endTime time] [-filter string] [-keepKeysOnFrame] [-kernel string] [-keySync] [-maxTimeStep float] [-minTimeStep float] [-period float] [-precision float] [-precisionMode int] [-preserveKeyTangent string] [-sampleCount int] [-samplingRate float] [-selectedKeys] [-startTime time] [-timeTolerance float] [-tolerance float] [-useQuaternion] [-width time]

filterCurve is undoable, NOT queryable, and NOT editable.

The filterCurve command takes a list of anim curve and filters them using a specified filter. The following filters are supported: butterworth euler gaussian keyReducer peakRemover keySync resample simplify

Return value

intThe number of filtered curves

Keywords

filter

Flags

cutoffFrequency, endTime, filter, keepKeysOnFrame, kernel, keySync, maxTimeStep, minTimeStep, period, precision, precisionMode, preserveKeyTangent, sampleCount, samplingRate, selectedKeys, startTime, timeTolerance, tolerance, useQuaternion, width
Long name (short name) Argument types Properties
-cutoffFrequency(-cof) float create
Defines the cutoff frequency (in Hz) for the Butterworth filter.
-endTime(-e) time create
Specify the end time of the section to filter. If not specified, the last key of the animation curve is used to define the end time.
-filter(-f) string create
Specifies the filter type to use. The avalible filters are: butterworth euler (default) gaussian keyReducer peakRemover keySync resample simplify
-keepKeysOnFrame(-kof) create
When specified, a secondary filter pass is applied to position keys on whole frames. This flag is only supported by the Butterworth filter.
-kernel(-ker) string create
The resample kernel is a decimation resampling filter used to resample dense data. It works on the keyframes and may not produce the desired results when used with sparse data.

The resample filter converts from either uniform or non-uniform timestep input data samples to the specified uniform timeStep. Various time domain filters are available and are specified with the kernel flag which selects the resampling kernel applied to the keyframes on the animation curves.

Kernel Values
closest Closest sample to output timestamp
lirp Linear interpolation between closest samples
box Box filter: moving average
triangle Triangle filter: (1 - |x|) weighted moving average
gaussian2 Gaussian2 Filter: (2^(-2x*x)) weighted moving average
gaussian4 Gaussian4 Filter: (2^(-4x*x)) weighted moving average

This filter is only targeted at decimation resampling -- interpolation resampling is basically unsupported. If your output framerate is much higher than your input frame rate (approximate, as the input timestep is not assumed to be regular) the lirp and triangle will interpolate (usually) and the rest will either average, or use the closest sample (depending on the phase and frequency of the input). However this mode of operation may not give the expected result.

-keySync(-ks) create
When specified, a secondary filter pass is applied that adds a key to sibling curves (X,Y,Z) for each key that is encountered. This flag is only supported by the Key Reducer filter.
-maxTimeStep(-mxs) float create
Simplify filter.
-minTimeStep(-mns) float create
Simplify filter.
-period(-per) float create
Resample filter
-precision(-pre) float create
Defines the precision parameter. For the Key Reducer filter, this parameter specifies the error limit between the source and output curves. Greater values reduce precision. Lower values increase precision.
-precisionMode(-pm) int create
Defines whether the precision value should be treated as: 0: An absolute value 1: A percentage.
-preserveKeyTangent(-pkt) string createmultiuse
When specified, keys whose in or out tangent type match the specified type are preserved. Supported tangent types: fixed linear flat smooth step clamped plateau stepnext auto This flag is only supported by the Key Reducer filter.
-sampleCount(-sc) int create
Defines the Gaussian filter kernel dimension.
-samplingRate(-sr) float create
Defines the rate at which keys are added to the Butterworth filtered curve in frames per second (FPS).
-selectedKeys(-sk) create
When specified, the filter is only applied to selected keys. This flag supercedes the startTime/endTime specification.
-startTime(-s) time create
Specify the start time to filter. If not specified, then the first key in the animation curve is used to get the start time.
-timeTolerance(-tto) float create
Simplify filter.
-tolerance(-tol) float create
Simplify filter.
-useQuaternion(-uq) create
Enable to use quaternion instead of euler.
-width(-w) time create
Defines the width of the Gaussian filter.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

filterCurve nurbsCone1_rotateX nurbsCone1_rotateY nurbsCone1_rotateZ;