AnimKey

Warning

AnimKey.data() gathering is incomplete. Tangent positions are missing.

class cgp_maya_utils.api.AnimKey(node, frame, value)

Bases: object

animation key object that manipulates a key of an animCurve stored in an animCurve node

classmethod create(node, frame=None, value=None, inTangentType=None, outTangentType=None, **__)

create an animation key

Parameters:
  • node (str or cgp_maya_utils.scene.Node) – animCurve node where the animation key exists
  • frame (float) – frame of the animation key - currentFrame if Nothing specified
  • value (float) – value of the animation key - key is inserted if nothing is specified
  • inTangentType (str) – inTangent type of the animation key - default is cgp_maya_utils.constants.TangentType.AUTO
  • outTangentType (str) – outTangent type of the animation key - default is cgp_maya_utils.constants.TangentType.AUTO
Returns:

the created animation key

Return type:

cgp_maya_utils.api.AnimKey

data()

data necessary to store the animation key on disk and/or recreate it from scratch

Returns:the data of the animation key
Return type:dict
frame()

the frame of the animation key

Returns:the frame of the animation key
Return type:float
inTangentType()

the inTangent type of the animation key

Returns:the inTangent type of the animation key
Return type:str
outTangentType()

the outTangent type of the animation key

Returns:the outTangent type of the animation key
Return type:str
value()

the value of the animation key

Returns:the value of the animation key
Return type:float