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

Synopsis

filterCurve([endTime=time], [filter=string], [kernel=string], [maxTimeStep=float], [minTimeStep=float], [period=float], [startTime=time], [timeTolerance=float], [tolerance=float])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

filterCurve is undoable, NOT queryable, and NOT editable.

The filterCurve command takes a list of anim curve and filters them. Currently only a Euler filter is supported. The Euler filter demangles discontinous rotation anim curves into smooth curves.

Return value

int The number of filtered curves

Keywords

filter

Flags

endTime, filter, kernel, maxTimeStep, minTimeStep, period, startTime, timeTolerance, tolerance
Long name (short name) Argument types Properties
filter(f) string create
Specifies the filter type to use. The avalible filters are euler, simplify, and resample. By default euler is used.
tolerance(tol) float create
Simplify filter.
timeTolerance(tto) float create
Simplify filter.
minTimeStep(mns) float create
Simplify filter.
maxTimeStep(mxs) float create
Simplify filter.
period(per) float create
Resample 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.
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.
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.

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 have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

cmds.filterCurve( 'nurbsCone1_rotateX', 'nurbsCone1_rotateY', 'nurbsCone1_rotateZ' )