Function set for operations on anim curves.
__init__()
Initializes a new, empty MFnAnimCurve object.
__init__(MObject object)
Initializes a new MFnAnimCurve and attaches it
to an animCurve object.
__init__(MPlug plug)
Initializes a new MFnAnimCurve and attaches it
to the single animCurve node connected to the given MPlug.
Method resolution order:
- MFnAnimCurve
- OpenMaya.MFnDependencyNode
- OpenMaya.MFnBase
- __builtin__.object
Inheritance diagram for OpenMayaAnim.MFnAnimCurve:
x.__init__(...) initializes x; see help(type(x)) for signature
Member Function Documentation
OpenMayaAnim.MFnAnimCurve.addKey
(
)
addKey(at, value, tangentInType=kTangentGlobal, tangentOutType=kTangentGlobal, change=None) -> unsigned int
Adds a new key with the given value at the specified time.
at and value can both be either MTime or double,depending on what is appropriate for the animCurve type.
change is an optional MAnimCurveChange.
OpenMayaAnim.MFnAnimCurve.addKeys
(
)
addKeys(times, values, tangentInType=kTangentGlobal, tangentOutType=kTangentGlobal, keepExistingKeys=False, change=None) -> self
Add a set of new keys with the given corresponding values and tangent typesat the specified times. This method only works for animCurves of typekAnimCurveTA, kAnimCurveTL and kAnimCurveTU.
OpenMayaAnim.MFnAnimCurve.addKeysWithTangents
(
)
addKeysWithTangents(times, values, tangentInType=kTangentGlobal, tangentOutType=kTangentGlobal, tangentInTypeArray=None, tangentOutTypeArray=None, tangentInXArray=None, tangentInYArray=None, tangentOutXArray=None, tangentOutYArray=None, tangentsLockedArray=None, weightsLockedArray=None, convertUnits=True, keepExistingKeys=False, change=None) -> self
Add a set of new keys with the given corresponding values, tangent types and tangents at the specified times. This method only works for animCurves of typekAnimCurveTA, kAnimCurveTL and kAnimCurveTU.
OpenMayaAnim.MFnAnimCurve.create
(
)
create(node, attribute, animCurveType=kAnimCurveUnknown [, modifier] ) -> MObject
create(plug, animCurveType=kAnimCurveUnknown [, modifier] ) -> MObject
create(animCurveType [, modifier] ) -> MObject
Creates a new animCurve node.
If node and attribute (MObject) are supplied, the animCurvewill be connected to the given attribute on the given node.
If plug (MPlug) is supplied, the animCurvewill be connected to the given plug.
modifier is an optional MDGModifier which can be used to later undo the operation.
animCurveType specifies the type of animCurve to create. Valid values are:
kAnimCurveTA Time to Angular
kAnimCurveTL Time to Linear
kAnimCurveTT Time to Time
kAnimCurveTU Time to Unitless
kAnimCurveUA Unitless to Angular
kAnimCurveUL Unitless to Linear
kAnimCurveUT Unitless to Time
kAnimCurveUU Unitless to Unitless
kAnimCurveUnknown Unknown type
OpenMayaAnim.MFnAnimCurve.evaluate
(
)
evaluate(at) -> value
Evalutes the curve.
For curves of type kAnimCurveTA, kAnimCurveTL and kAnimCurveTU,the at parameter is an MTime, otherwise it is a double.
For curves of type kAnimCurveTT and kAnimCurveUT,the value is an MTime, otherwise it is a double.
OpenMayaAnim.MFnAnimCurve.find
(
)
find(at) -> unsigned int
Determines the index of the key which is set at the specifiedMTime (time-input curves) or double (unitless-input curves).
Returns None if the key is not found.
OpenMayaAnim.MFnAnimCurve.findClosest
(
)
findClosest(at) -> unsigned int
Determines the index of the key which is set at theMTime (time-input curves) or double (unitless-input curves)closest to the specified time.
OpenMayaAnim.MFnAnimCurve.getTangentAngleWeight
(
)
getTangentAngleWeight(index, isInTangent) -> (MAngle,double)
Determines the angle and weight of the in- or out-tangent to the curvefor the key at the specified index
OpenMayaAnim.MFnAnimCurve.getTangentXY
(
)
getTangentXY(index, isInTangent) -> (x,y)
Determines the x,y value representing the vector of the in- orout-tangent (depending on the value of the isInTangent parameter) tothe curve for the key at the specified index. The values returnedwill be in Maya's internal units (seconds for time, centimeters forlinear, radians for angles).
OpenMayaAnim.MFnAnimCurve.input
(
)
input(index) -> MTime or double
Determines the input (MTime for T* curves or double for U* curves) of the key at the specified index.
OpenMayaAnim.MFnAnimCurve.inTangentType
(
)
inTangentType(index) -> TangentType
Determines the type of the tangent to the curve entering the current key.
OpenMayaAnim.MFnAnimCurve.isBreakdown
(
)
isBreakdown(index) -> bool
Determines whether or not a key is a breakdown.
OpenMayaAnim.MFnAnimCurve.outTangentType
(
)
outTangentType(index) -> TangentType
Determines the type of the tangent to the curve leaving the current key.
OpenMayaAnim.MFnAnimCurve.remove
(
)
remove(index, change=None) -> self
Removes the key at the specified index.
change is an optional MAnimCurveChange.
OpenMayaAnim.MFnAnimCurve.setAngle
(
)
setAngle(index, setAngle, isInTangent, change=None) -> self
Sets the in- or out-angle of the tangent for the key at the given index.
isInTangent is True to modify the inTangent or False to modify the outTangent.
OpenMayaAnim.MFnAnimCurve.setInput
(
)
setInput(index, at, change=None) -> self
Sets the input (MTime for T* curves or double for U* curves) of the key at the specified index. This will fail ifsetting the input would require re-ordering of the keys.
OpenMayaAnim.MFnAnimCurve.setInTangentType
(
)
setInTangentType(index, tangentType, change=None) -> self
Sets the type of the tangent to the curve entering the key at thespecified index.
Valid values for tangentType are:
kTangentGlobal Global
kTangentFixed Fixed
kTangentLinear Linear
kTangentFlat Flag
kTangentSmooth Smooth
kTangentStep Step
kTangentSlow OBSOLETE kTangentSlow should not be used. Using this tangent type may produce unwanted and unexpected results.
kTangentFast OBSOLETE kTangentFast should not be used. Using this tangent type may produce unwanted and unexpected results.
kTangentClamped Clamped
kTangentPlateau Plateau
kTangentStepNext StepNext
kTangentAuto Auto
OpenMayaAnim.MFnAnimCurve.setIsBreakdown
(
)
setIsBreakdown(index, isBreakdown, change=None) -> self
Sets the breakdown state of a key at a given index.
OpenMayaAnim.MFnAnimCurve.setIsWeighted
(
)
setIsWeighted(isWeighted, change=None) -> self
Sets whether or not the curve has weighted tangents.
OpenMayaAnim.MFnAnimCurve.setOutTangentType
(
)
setOutTangentType(index, tangentType, change=None) -> self
Sets the type of the tangent to the curve leaving the key at thespecified index.
OpenMayaAnim.MFnAnimCurve.setPostInfinityType
(
)
setPostInfinityType(infinityType, change=None) -> self
Sets the behaviour of the curve for the range occurring after the last key.
OpenMayaAnim.MFnAnimCurve.setPreInfinityType
(
)
setPreInfinityType(infinityType, change=None) -> self
Sets the behaviour of the curve for the range occurring before the first key.
Valid values for infinityType are:
kConstant Constant
kLinear Linear
kCycle Cycle
kCycleRelative Cycle relative
kOscillate Oscillate
OpenMayaAnim.MFnAnimCurve.setTangent
(
)
setTangent(index, xOrAngle, yOrWeight, isInTangent, change=None, convertUnits=True) -> self
Sets the tangent for the key at the specified index.
The tangent can be specified as an x/y pair, oras an MAngle and a weight.
isInTangent is True to modify the inTangent or False to modify the outTangent.
OpenMayaAnim.MFnAnimCurve.setTangentsLocked
(
)
setTangentsLocked(index, locked, change=None) -> self
Lock or unlock the tangents at the given key.
OpenMayaAnim.MFnAnimCurve.setTangentTypes
(
)
setTangentTypes(indexArray, tangentInType=kTangentGlobal, tangentOutType=kTangentGlobal, change=None) -> self
Sets the tangent types for multiple keys.
OpenMayaAnim.MFnAnimCurve.setValue
(
)
setValue(index, value, change=None) -> self
Sets the value of the key at the specified index. This methodshould only be used on Anim Curves of type kAnimCurve*A, kAnimCurve*Lor kAnimCurve*U.
OpenMayaAnim.MFnAnimCurve.setWeight
(
)
setWeight(index, weight, isInTangent, change=None) -> self
Sets the in- or out-weight of the tangent for the key at the given index.
isInTangent is True to modify the inTangent or False to modify the outTangent.
OpenMayaAnim.MFnAnimCurve.setWeightsLocked
(
)
setWeightsLocked(index, locked, change=None) -> self
Lock or unlock the weights at the given key.
OpenMayaAnim.MFnAnimCurve.tangentsLocked
(
)
tangentsLocked(index) -> bool
Determines whether the tangents are locked at the given key.
unitlessAnimCurveTypeForPlug(plug) -> AnimCurveType
Returns the unitless animCurve type appropriate for the specified plug.
OpenMayaAnim.MFnAnimCurve.value
(
)
value(index) -> double
Determines the value of the key at the specified index. This methodshould only be used on Anim Curves of type kAnimCurve*A, kAnimCurve*Lor kAnimCurve*U.
OpenMayaAnim.MFnAnimCurve.weightsLocked
(
)
weightsLocked(index) -> bool
Determines whether the weights are locked at the given key.