AnimCurve

class cgp_maya_utils.scene.AnimCurve(name)

Bases: cgp_maya_utils.scene.Node

node object that manipulates any kind of animation curve node

addAnimKey(frame=None, value=None, inTangentType=None, outTangentType=None, **__)

add an animation key on the animation curve

Parameters:
  • frame (float) – frame of the animation key - current frame if None is specified
  • value (float) – value of the animation key - key will be inserted if None is specified
  • inTangentType (str) – type of the inTangent of the animation key - default is cgp_maya_utils.constants.TangentType.AUTO
  • outTangentType (str) – type of the outTangent of the animation key - - default is cgp_maya_utils.constants.TangentType.AUTO
Returns:

the added animation key

Return type:

cgp_maya_utils.api.AnimKey

classmethod create(keys=None, drivenAttributes=None, attributeValues=None, name=None, connections=None, **__)

create an animation curve node

Parameters:
  • keys (list[dict]) – keys defining the profile of the animation curve - [AnimKey1.data(), AnimKey2.data() ...]
  • drivenAttributes (list[str]) – attributes driven by the animation curve node
  • attributeValues (dict) – attribute values to set on the animation curve node
  • name (str) – name of the animation curve node
  • connections (list[tuple]) – connections to set on the animation curve node
Returns:

the animation curve object

Return type:

cgp_maya_utils.scene.AnimCurve

data()

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

Returns:the data of the animation curve
Return type:dict
drivenAttributes()

the attributes driven by the anim curve node

Returns:the driven attributes
Return type:list[cgp_maya_utils.scene.Attribute]
keys()

the animation keys of the animation curve node

Returns:the animation keys
Return type:list[cgp_maya_utils.api.AnimKey]