pymel.core.nodetypes.AnimCurve

Inheritance diagram of AnimCurve

class AnimCurve(*args, **kwargs)
AnimCurveType = Enum( EnumValue('AnimCurveType', 0, 'TA'), EnumValue('AnimCurveType', 1, 'TL'), EnumValue('AnimCurveType', 2, 'TT'), EnumValue('AnimCurveType', 3, 'TU'), EnumValue('AnimCurveType', 4, 'UA'), EnumValue('AnimCurveType', 5, 'UL'), EnumValue('AnimCurveType', 6, 'UT'), EnumValue('AnimCurveType', 7, 'UU'), EnumValue('AnimCurveType', 8, 'unknown'))
InfinityType = Enum( EnumValue('InfinityType', 0, 'constant'), EnumValue('InfinityType', 1, 'linear'), EnumValue('InfinityType', 3, 'cycle'), EnumValue('InfinityType', 4, 'cycleRelative'), EnumValue('InfinityType', 5, 'oscillate'))
TangentType = Enum( EnumValue('TangentType', 0, 'global_'), EnumValue('TangentType', 1, 'fixed'), EnumValue('TangentType', 2, 'linear'), EnumValue('TangentType', 3, 'flat'), EnumValue('TangentType', 4, 'smooth'), EnumValue('TangentType', 5, 'step'), EnumValue('TangentType', 6, 'slow'), EnumValue('TangentType', 7, 'fast'), EnumValue('TangentType', 8, 'clamped'), EnumValue('TangentType', 9, 'plateau'), EnumValue('TangentType', 10, 'stepNext'), EnumValue('TangentType', 11, 'auto'))
addKeys(time, values, tangentInType='linear', tangentOutType='linear', unit=None)
animCurveType()

Returns the animCurve type

Return type:AnimCurve.AnimCurveType

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.animCurveType

getInTangentType(index)

Determines the type of the tangent to the curve entering the current key.

Parameters :
index : int

Index of the key for which the tangent type is required

Return type:

AnimCurve.TangentType

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.inTangentType

getOutTangentType(index)

Determines the type of the tangent to the curve leaving the current key.

Parameters :
index : int

Index of the key for which the tangent type is required

Return type:

AnimCurve.TangentType

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.outTangentType

getPostInfinityType()

Determines the behaviour of the curve for the range occurring after the last key.

Return type:AnimCurve.InfinityType

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.postInfinityType

getPreInfinityType()

Determines the behaviour of the curve for the range occurring before the first key.

Return type:AnimCurve.InfinityType

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.preInfinityType

getTangent(index, inTangent)

Determines the x,y value representing the vector of the in- or out-tangent (depending on the value of the inTangent parameter) to the curve for the key at the specified index. The values returned will be in Maya’s internal units (seconds for time, linear units for linear, angular units for angles). The following examples demonstrates how to convert from internal units of seconds into the current user time unit.

Parameters :
index : int

Index of the key for which the tangent x,y value is required

inTangent : bool

If true, the in-tangent is returned, else, the out-tangent is returned

Return type:

(float, float)

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.getTangent

getTangentsLocked(index)

Determines whether the tangents are locked at the given key.

Parameters :
index : int

Index of the key to check for locked tangents

Return type:

bool

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.tangentsLocked

getTime(index)

Determines the time of the key at the specified index.

Parameters :
index : int

Index of the key for which the time is required

Return type:

Time

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.time

getUnitlessInput(index)

Determines the unitless input value of the key at the specified index. This method should only be used on Anim Curves of type kAnimCurveU*.

Parameters :
index : int

Index of the key for which the input value is required

Return type:

float

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.unitlessInput

getValue(index)

Determines the value of the key at the specified index. This method should only be used on Anim Curves of type kAnimCurve*A, kAnimCurve*L or kAnimCurve*U.

Parameters :
index : int

Index of the key for which the value is required

Return type:

float

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.value

getWeightsLocked(index)

Determines whether the weights are locked at the given key.

Parameters :
index : int

Index of the key to check for locked weights

Return type:

bool

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.weightsLocked

isBreakdown(index)

Determines whether or not a key is a breakdown.

Parameters :
index : int

The key’s index

Return type:

bool

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.isBreakdown

isStatic()

Determines whether or not the animCurve is static. The animCurve is considered to be static if it would return the same value regardless of the evaluation time. This basically means that the values of all the keys are the same and the y component of all the tangents is 0.

Return type:bool

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.isStatic

isTimeInput()

Determines the input type of the animCurve.

Return type:bool

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.isTimeInput

isUnitlessInput()

Determines the input type of the animCurve.

Return type:bool

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.isUnitlessInput

isWeighted()

Determines whether or not the curve has weighted tangents.

Return type:bool

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.isWeighted

numKeys()

Determines the number of keys on the Anim Curve Node.

Return type:int

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.numKeys

remove(index, change=None)

Removes the key at the specified index.

Parameters :
index : int

Index of the key to be removed

change : MAnimCurveChange

Optional cache to store undo/redo information.

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.remove

Undo is not currently supported for this method

setAngle(index, angle, inTangent, change=None)

Set the in- or out-angle of the tangent for the key at the given index

Parameters :
index : int

Index of the key

angle : Angle

The new in- or out-angle for the key’s tangent

inTangent : bool

If true, set the in-tangent, else out-tangent

change : MAnimCurveChange

Optional cache to store undo/redo information.

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.setAngle

Undo is not currently supported for this method

setBreakdown(index, isBreakdown, change=None)

Sets the breakdown state of a key at a given index.

Parameters :
index : int

Index of the key whose breakdown state is to be modified

isBreakdown : bool

The new breakdown state for the key.

change : MAnimCurveChange

Optional cache to store undo/redo information.

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.setIsBreakdown

setInTangentType(index, tangentType, change=None)

Sets the type of the tangent to the curve entering the key at the specified index.

Parameters :
index : int

Index of the key for which the tangent type is to be set

tangentType : AnimCurve.TangentType

Type to which the tangent is to be set

values: ‘global_‘, ‘fixed’, ‘linear’, ‘flat’, ‘smooth’, ‘step’, ‘slow’, ‘fast’, ‘clamped’, ‘plateau’, ‘stepNext’, ‘auto’

change : MAnimCurveChange

Optional cache to store undo/redo information.

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.setInTangentType

setOutTangentType(index, tangentType, change=None)

Sets the type of the tangent to the curve leaving the key at the specified index.

Parameters :
index : int

Index of the key for which the tangent type is to be set

tangentType : AnimCurve.TangentType

Type to which the tangent is to be set

values: ‘global_‘, ‘fixed’, ‘linear’, ‘flat’, ‘smooth’, ‘step’, ‘slow’, ‘fast’, ‘clamped’, ‘plateau’, ‘stepNext’, ‘auto’

change : MAnimCurveChange

Optional cache to store undo/redo information.

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.setOutTangentType

setPostInfinityType(infinityType, change=None)

Set the behaviour of the curve for the range occurring after the last key.

Parameters :
infinityType : AnimCurve.InfinityType

The infinity type to be set.

values: ‘constant’, ‘linear’, ‘cycle’, ‘cycleRelative’, ‘oscillate’

change : MAnimCurveChange

Optional cache to store undo/redo information.

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.setPostInfinityType

setPreInfinityType(infinityType, change=None)

Set the behaviour of the curve for the range occurring before the first key.

Parameters :
infinityType : AnimCurve.InfinityType

The infinity type to be set.

values: ‘constant’, ‘linear’, ‘cycle’, ‘cycleRelative’, ‘oscillate’

change : MAnimCurveChange

Optional cache to store undo/redo information.

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.setPreInfinityType

setTangent(index, x, y, inTangent, change=None, convertUnits=True)

Sets the tangent for the key at the specified index. If convertUnits is true (the default) the x value will be scaled by the current UI time units and the y value will be scaled by the relevant UI units for the output type of the animation curve (i.e. linear units for a curve that outputs linear data, and so on).

Parameters :
index : int

Index of the key for which the tangent type is to be set

x : float

Absolute x value of the slope of the tangent

y : float

Absolute y value of the slope of the tangent

inTangent : bool

If true, the inTangent is modified, else, the outTangent is modified

change : MAnimCurveChange

Optional cache to store undo/redo information.

convertUnits : bool

Whether to convert to UI units before setting

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.setTangent

setTangentTypes(indexArray, inTangentType='global_', outTangentType='global_', change=None)

Sets the tangent types for multiple keys.

Parameters :
indexArray : int list

Indices of the key for which the tangent type is to be set

inTangentType : AnimCurve.TangentType

Type to which the in tangent is to be set

values: ‘global_‘, ‘fixed’, ‘linear’, ‘flat’, ‘smooth’, ‘step’, ‘slow’, ‘fast’, ‘clamped’, ‘plateau’, ‘stepNext’, ‘auto’

outTangentType : AnimCurve.TangentType

Type to which the out tangent is to be set

values: ‘global_‘, ‘fixed’, ‘linear’, ‘flat’, ‘smooth’, ‘step’, ‘slow’, ‘fast’, ‘clamped’, ‘plateau’, ‘stepNext’, ‘auto’

change : MAnimCurveChange

Optional cache to store undo/redo information.

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.setTangentTypes

Undo is not currently supported for this method

setTangentsLocked(index, locked, change=None)

Lock or unlock the tangents at the given key.

Parameters :
index : int

Index of the key at which to set/unset the locks

locked : bool

true if the tangents are to be locked, false otherwise

change : MAnimCurveChange

Optional cache to store undo/redo information.

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.setTangentsLocked

setTime(index, time, change=None)

Sets the time of the key at the specified index. This will fail if setting the time would require re-ordering of the keys. This method should only be used on Anim Curves of type kAnimCurveT*.

Parameters :
index : int

Index of the key for which the time is to be set

time : Time

Time to which the indexed key time is to be set

change : MAnimCurveChange

Optional cache to store undo/redo information.

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.setTime

setUnitlessInput(index, unitlessInput, change=None)

Sets the value of the unitless input of the key at the specified index. This will fail if setting the value would require re-ordering of the keys. This methid should only be used on Anim Curves of type kAnimCurveU*.

Parameters :
index : int

Index of the key for which the unitless input value is to be set

unitlessInput : float

Value to which the indexed key unitless input value is to be set

change : MAnimCurveChange

Optional cache to store undo/redo information.

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.setUnitlessInput

setValue(index, value, change=None)

Sets the value of the key at the specified index. This method should only be used on Anim Curves of type kAnimCurve*A, kAnimCurve*L or kAnimCurve*U.

Parameters :
index : int

Index of the key for which the value is to be set

value : float

Value to which the key is to be set

change : MAnimCurveChange

Optional cache to store undo/redo information.

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.setValue

setWeight(index, weight, inTangent, change=None)

Set the in- or out-weight of the tangent for the key at the given index

Parameters :
index : int

Index of the key

weight : float

The new in- or out-weight for the key’s tangent

inTangent : bool

If true, set the in-tangent, else set out-tangent

change : MAnimCurveChange

Optional cache to store undo/redo information.

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.setWeight

Undo is not currently supported for this method

setWeighted(isWeighted, change=None)

Sets whether or not the curve has weighted tangents.

Parameters :
isWeighted : bool

Whether or not the curve should have weighted tangents

change : MAnimCurveChange

Optional cache to store undo/redo information.

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.setIsWeighted

setWeightsLocked(index, locked, change=None)

Lock or unlock the weights at the given key.

Parameters :
index : int

Index of the key at which to set/unset the locks

locked : bool

true if the weights are to be locked, false otherwise

change : MAnimCurveChange

Optional cache to store undo/redo information.

Derived from api method maya.OpenMayaAnim.MFnAnimCurve.setWeightsLocked

Previous topic

pymel.core.nodetypes.AnimClip

Next topic

pymel.core.nodetypes.AnimCurveTA

Core

Core Modules

Other Modules

This Page