Go to: Synopsis. Return value. Related. Flags. Python examples.
filterKeyReducerCtx(
contextName
, [apply=boolean], [endTime=time], [exists=boolean], [history=boolean], [image1=string], [image2=string], [image3=string], [keySync=boolean], [name=string], [precision=float], [precisionMode=int], [preserveKeyTangent=string], [selectedKeys=boolean], [startTime=time])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
filterKeyReducerCtx is undoable, queryable, and editable.
Creates/edits a KeyReducer filter context. This context can be used
to interactively preview/edit the KeyReducer filter on a set of
animation curves.
In query mode, return type is based on queried flag.
filterCurve
apply, endTime, exists, history, image1, image2, image3, keySync, name, precision, precisionMode, preserveKeyTangent, selectedKeys, startTime
Long name (short name) |
Argument types |
Properties |
|
apply(a)
|
boolean
|
|
|
When specified, finalizes the current context state
and records the command for the operation. This is equivalent
to completing the tool action without exiting the current
tool context.
|
|
endTime(e)
|
time
|
|
|
Specifies the end time portion of the time range for this filter.
This time range is used when selectedKeys is false.
|
|
exists(ex)
|
boolean
|
|
|
Returns true or false depending upon whether the
specified object exists. Other flags are ignored.
|
|
history(ch)
|
boolean
|
|
|
If this is a tool command, turn the construction history on
for the tool in question.
|
|
image1(i1)
|
string
|
|
|
First of three possible icons representing the tool
associated with the context.
|
|
image2(i2)
|
string
|
|
|
Second of three possible icons representing the tool
associated with the context.
|
|
image3(i3)
|
string
|
|
|
Third of three possible icons representing the tool
associated with the context.
|
|
keySync(ks)
|
boolean
|
|
|
When true, a secondary filter pass is applied that adds a key to sibling
curves (X,Y,Z) for each key that is encountered.
|
|
name(n)
|
string
|
|
|
If this is a tool command, name the tool appropriately.
|
|
precision(pre)
|
float
|
|
|
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
|
|
|
Specifies the precision mode for the Key Reducer filter. Avaiable
modes are:
0: Absolute value.
1: Percentage
Default is 1 (percentage mode).
|
|
preserveKeyTangent(pkt)
|
string
|
|
|
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
|
|
selectedKeys(sk)
|
boolean
|
|
|
If true, sets the filter to apply to the selected keys. Otherwise,
the filter applies to the specified time range. Default is on.
|
|
startTime(s)
|
time
|
|
|
Specifies the start time portion of the time range for this filter.
This time range is used when selectedKeys is false.
|
|
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.
|
import maya.cmds as cmds
import maya.cmds as cmds
# Create a context
ctx = cmds.filterKeyReducerCtx()
# Activate the tool context
cmds.setToolTo( ctx )
# Adjust the KeyReducer cutoff frequency to selected keys.
cmds.filterKeyReducerCtx( ctx, e=True, sk=True, pm=1, pre=0.5 )
# Apply the current settings to the selected curves.
cmds.filterKeyReducerCtx( ctx, e=True, apply=True )