Python API 2.0 Reference
OpenMayaAnim.MFnAnimCurve Class Reference
+ Inheritance diagram for OpenMayaAnim.MFnAnimCurve:

Public Member Functions

def __init__ ()
 
def addKey ()
 
def addKeys ()
 
def addKeysWithTangents ()
 
def create ()
 
def evaluate ()
 
def find ()
 
def findClosest ()
 
def getTangentAngleWeight ()
 
def getTangentXY ()
 
def inTangentType ()
 
def input ()
 
def insertKey ()
 
def isBreakdown ()
 
def outTangentType ()
 
def remove ()
 
def setAngle ()
 
def setInTangentType ()
 
def setInput ()
 
def setIsBreakdown ()
 
def setIsWeighted ()
 
def setOutTangentType ()
 
def setPostInfinityType ()
 
def setPreInfinityType ()
 
def setTangent ()
 
def setTangentTypes ()
 
def setTangentsLocked ()
 
def setValue ()
 
def setWeight ()
 
def setWeightsLocked ()
 
def tangentsLocked ()
 
def timedAnimCurveTypeForPlug ()
 
def unitlessAnimCurveTypeForPlug ()
 
def value ()
 
def weightsLocked ()
 
- Public Member Functions inherited from OpenMaya.MFnDependencyNode
def __init__ ()
 
def absoluteName ()
 
def addAttribute ()
 
def addExternalContentForFileAttr ()
 
def affectsAnimation ()
 
def attribute ()
 
def attributeClass ()
 
def attributeCount ()
 
def canBeWritten ()
 
def create ()
 
def dgCallbackIds ()
 
def dgCallbacks ()
 
def dgTimer ()
 
def dgTimerOff ()
 
def dgTimerOn ()
 
def dgTimerQueryState ()
 
def dgTimerReset ()
 
def findAlias ()
 
def findPlug ()
 
def getAffectedAttributes ()
 
def getAffectingAttributes ()
 
def getAliasAttr ()
 
def getAliasList ()
 
def getConnections ()
 
def getExternalContent ()
 
def hasAttribute ()
 
def hasUniqueName ()
 
def isFlagSet ()
 
def isNewAttribute ()
 
def isTrackingEdits ()
 
def name ()
 
def plugsAlias ()
 
def removeAttribute ()
 
def reorderedAttribute ()
 
def setAffectsAnimation ()
 
def setAlias ()
 
def setDoNotWrite ()
 
def setExternalContent ()
 
def setExternalContentForFileAttr ()
 
def setFlag ()
 
def setName ()
 
def setUuid ()
 
def uniqueName ()
 
def userNode ()
 
def uuid ()
 
- Public Member Functions inherited from OpenMaya.MFnBase
def __init__ ()
 
def hasObj ()
 
def object ()
 
def setObject ()
 
def type ()
 

Static Public Member Functions

def __new__ ()
 
- Static Public Member Functions inherited from OpenMaya.MFnDependencyNode
def __new__ ()
 
def allocateFlag ()
 
def classification ()
 
def deallocateAllFlags ()
 
def deallocateFlag ()
 
- Static Public Member Functions inherited from OpenMaya.MFnBase
def __new__ ()
 

Static Public Attributes

int kAnimCurveTA = 0
 
int kAnimCurveTL = 1
 
int kAnimCurveTT = 2
 
int kAnimCurveTU = 3
 
int kAnimCurveUA = 4
 
int kAnimCurveUL = 5
 
int kAnimCurveUT = 6
 
int kAnimCurveUU = 7
 
int kAnimCurveUnknown = 8
 
int kConstant = 0
 
int kCycle = 3
 
int kCycleRelative = 4
 
int kLinear = 1
 
int kOscillate = 5
 
int kTangentAuto = 11
 
int kTangentAutoCustom = 29
 
int kTangentAutoEase = 28
 
int kTangentAutoMix = 27
 
int kTangentClamped = 8
 
int kTangentCustomEnd = 32767
 
int kTangentCustomStart = 64
 
int kTangentFast = 7
 
int kTangentFixed = 1
 
int kTangentFlat = 3
 
int kTangentGlobal = 0
 
int kTangentLinear = 2
 
int kTangentPlateau = 9
 
int kTangentShared1 = 19
 
int kTangentShared2 = 20
 
int kTangentShared3 = 21
 
int kTangentShared4 = 22
 
int kTangentShared5 = 23
 
int kTangentShared6 = 24
 
int kTangentShared7 = 25
 
int kTangentShared8 = 26
 
int kTangentSlow = 6
 
int kTangentSmooth = 4
 
int kTangentStep = 5
 
int kTangentStepNext = 10
 
int kTangentTypeCount = 32768
 
- Static Public Attributes inherited from OpenMaya.MFnDependencyNode
int kTimerMetrics = 9
 
int kTimerTypes = 3
 
int kExtensionAttr = 3
 
int kInvalidAttr = 4
 
int kLocalDynamicAttr = 1
 
int kNormalAttr = 2
 
int kTimerInvalidState = 3
 
int kTimerOff = 0
 
int kTimerOn = 1
 
int kTimerUninitialized = 2
 
int kTimerMetric_callback = 0
 
int kTimerMetric_callbackNotViaAPI = 6
 
int kTimerMetric_callbackViaAPI = 5
 
int kTimerMetric_compute = 1
 
int kTimerMetric_computeDuringCallback = 7
 
int kTimerMetric_computeNotDuringCallback = 8
 
int kTimerMetric_dirty = 2
 
int kTimerMetric_draw = 3
 
int kTimerMetric_fetch = 4
 
int kTimerType_count = 2
 
int kTimerType_inclusive = 1
 
int kTimerType_self = 0
 

Properties

 animCurveType = property(...)
 
 isStatic = property(...)
 
 isTimeInput = property(...)
 
 isUnitlessInput = property(...)
 
 isWeighted = property(...)
 
 numKeys = property(...)
 
 postInfinityType = property(...)
 
 preInfinityType = property(...)
 
- Properties inherited from OpenMaya.MFnDependencyNode
 isDefaultNode = property(...)
 
 isFromReferencedFile = property(...)
 
 isLocked = property(...)
 
 isShared = property(...)
 
 namespace = property(...)
 
 pluginName = property(...)
 
 typeId = property(...)
 
 typeName = property(...)
 

Detailed Description

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
-   builtins.object

Constructor & Destructor Documentation

def OpenMayaAnim.MFnAnimCurve.__init__ ( )
Initialize self.  See help(type(self)) for accurate signature.

Member Function Documentation

def OpenMayaAnim.MFnAnimCurve.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
def 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.
def 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.
def 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.
def 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
def 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.
def 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.
def 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.
def 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
def 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).
def 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.
def OpenMayaAnim.MFnAnimCurve.insertKey ( )
addKey(time, breakdown=False, change=None) -> unsigned int

Inserts a new key at the specified time adjusting neighboring
tangents to maintain curve shape. This method is the API equivalent
to maya.cmds.setKeyframe(insert=True).
breakdown specifies the breakdown state of the newly inserted key.
change is an optional MAnimCurveChange.
Returns the index of the newly inserted key.
def OpenMayaAnim.MFnAnimCurve.inTangentType ( )
inTangentType(index) -> TangentType

Determines the type of the tangent to the curve entering the current key.
def OpenMayaAnim.MFnAnimCurve.isBreakdown ( )
isBreakdown(index) -> bool

Determines whether or not a key is a breakdown.
def OpenMayaAnim.MFnAnimCurve.outTangentType ( )
outTangentType(index) -> TangentType

Determines the type of the tangent to the curve leaving the current key.
def OpenMayaAnim.MFnAnimCurve.remove ( )
remove(index, change=None) -> self

Removes the key at the specified index.
change is an optional MAnimCurveChange.
def 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.
def 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.
def 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            AutokTangentAutoMix             AutoMixkTangentAutoEase         AutoEasekTangentAutoCustom              AutoCustom
def OpenMayaAnim.MFnAnimCurve.setIsBreakdown ( )
setIsBreakdown(index, isBreakdown, change=None) -> self

Sets the breakdown state of a key at a given index.
def OpenMayaAnim.MFnAnimCurve.setIsWeighted ( )
setIsWeighted(isWeighted, change=None) -> self

Sets whether or not the curve has weighted tangents.
def OpenMayaAnim.MFnAnimCurve.setOutTangentType ( )
setOutTangentType(index, tangentType, change=None) -> self

Sets the type of the tangent to the curve leaving the key at thespecified index.
def OpenMayaAnim.MFnAnimCurve.setPostInfinityType ( )
setPostInfinityType(infinityType, change=None) -> self

Sets the behaviour of the curve for the range occurring after the last key.
def 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
def 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.
def OpenMayaAnim.MFnAnimCurve.setTangentsLocked ( )
setTangentsLocked(index, locked, change=None) -> self

Lock or unlock the tangents at the given key.
def OpenMayaAnim.MFnAnimCurve.setTangentTypes ( )
setTangentTypes(indexArray, tangentInType=kTangentGlobal, tangentOutType=kTangentGlobal, change=None) -> self

Sets the tangent types for multiple keys.
def 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.
def 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.
def OpenMayaAnim.MFnAnimCurve.setWeightsLocked ( )
setWeightsLocked(index, locked, change=None) -> self

Lock or unlock the weights at the given key.
def OpenMayaAnim.MFnAnimCurve.tangentsLocked ( )
tangentsLocked(index) -> bool

Determines whether the tangents are locked at the given key.
def OpenMayaAnim.MFnAnimCurve.timedAnimCurveTypeForPlug ( )
timedAnimCurveTypeForPlug(plug) -> AnimCurveType

Returns the timed animCurve type appropriate for the specified plug.
def OpenMayaAnim.MFnAnimCurve.unitlessAnimCurveTypeForPlug ( )
unitlessAnimCurveTypeForPlug(plug) -> AnimCurveType

Returns the unitless animCurve type appropriate for the specified plug.
def 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.
def OpenMayaAnim.MFnAnimCurve.weightsLocked ( )
weightsLocked(index) -> bool

Determines whether the weights are locked at the given key.

Property Documentation

OpenMayaAnim.MFnAnimCurve.animCurveType = property(...)
static
 Anim curve type.
OpenMayaAnim.MFnAnimCurve.isStatic = property(...)
static
 Whether the curve is static.
OpenMayaAnim.MFnAnimCurve.isTimeInput = property(...)
static
 Whether the curve has time as an input.
OpenMayaAnim.MFnAnimCurve.isUnitlessInput = property(...)
static
 Whether the curve has unitless input.
OpenMayaAnim.MFnAnimCurve.isWeighted = property(...)
static
 Whether the curve has weighted tangents.
OpenMayaAnim.MFnAnimCurve.numKeys = property(...)
static
 Number of keys.
OpenMayaAnim.MFnAnimCurve.postInfinityType = property(...)
static
 The curve's post-infinity type.
OpenMayaAnim.MFnAnimCurve.preInfinityType = property(...)
static
 The curve's pre-infinity type.