Go to: Synopsis. Return value. Related. Flags. Python examples.
filterGaussianCtx(
contextName
, [apply=boolean], [endTime=time], [exists=boolean], [history=boolean], [image1=string], [image2=string], [image3=string], [name=string], [sampleCount=int], [selectedKeys=boolean], [startTime=time], [useQuaternion=boolean], [width=time])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
filterGaussianCtx is undoable, queryable, and editable.
Creates a smooth (gaussian) filter context. This context can ben used
to interactively preview/edit the smooth (gaussian) 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, name, sampleCount, selectedKeys, startTime, useQuaternion, width
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.
|
|
name(n)
|
string
|
|
|
If this is a tool command, name the tool appropriately.
|
|
sampleCount(sc)
|
int
|

|
|
This parameter specifies the number of neighbor will be sampled.
|
|
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.
|
|
useQuaternion(uq)
|
boolean
|

|
|
When this is enabled, the filter will first convert the curves
(rotation channel curves, 3 sibling requires at the same time)
from Euler space to quaternions. Then apply the gaussian filter
on it. Convert it back from Quaternions back to Euler space eventually.
|
|
width(w)
|
time
|

|
|
This parameter specifies the width of the gaussian kernel shape.
Wider width will
|
|
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.filterGaussianCtx()
# Set the context to the new context just created
cmds.setToolTo(ctx)
# Adjust the width and sample count to selected curves.
cmds.filterGaussianCtx(ctx, e=True, width=3, sampleCount=8)
# Apply current settings to the real curves.
cmds.filterGaussianCtx(ctx, e=True, a=True)