c4d.CKey

This is the animation key base class.

Inheritance

Members

CKey.GetTime()

Get the time of this key.

Return type:c4d.BaseTime
Returns:The time.
CKey.GetTimeLeft()

Get the left time of this key.

Return type:c4d.BaseTime
Returns:The left time.
CKey.GetTimeRight()

Get the left time of this key.

Return type:c4d.BaseTime
Returns:The right time.
CKey.GetValue()

Get the value of this key. Just for keys with float values.

Return type:float
Returns:The value.
CKey.GetValueLeft()

Get the value of this key. Just for keys with float values.

Return type:float
Returns:The value.
CKey.GetValueRight()

Get the right of this key. Just for keys with float values.

Return type:float
Returns:The value.
CKey.SetValue(seq, v)

Set the value of this key.

Parameters:
  • seq (c4d.CCurve) – The curve.
  • v (float) – The new value.
CKey.SetValueLeft(seq, v)

Set the left value of this key.

Parameters:
  • seq (c4d.CCurve) – The curve.
  • v (float) – The new value.
CKey.SetValueRight(seq, v)

Set the right value of this key.

Parameters:
  • seq (c4d.CCurve) – The curve.
  • v (float) – The new value.
CKey.SetTime(seq, t)

Set the time of this key.

Parameters:
CKey.SetTimeLeft(seq, t)

Set the left time of this key.

Parameters:
CKey.SetTimeRight(seq, t)

Set the right time of this key.

Parameters:
CKey.SetInterpolation(seq, inter)

Set the interpolation type of this key.

Parameters:
  • seq (c4d.CCurve) – The curve.
  • int

    The new interpolation type:

    CINTERPOLATION_SPLINE Spline.
    CINTERPOLATION_LINEAR Linear
    CINTERPOLATION_STEP Step.
CKey.GetInterpolation()

Returns the interpolation type.

Return type:int
Returns:The interpolation type:
CINTERPOLATION_SPLINE Spline.
CINTERPOLATION_LINEAR Linear
CINTERPOLATION_STEP Step.
CKey.SetQuatInterpolation(seq, inter, bUndo=True)

New in version R18.020.

Sets the quaternion interpolation type of the key.

Note

Keys at the same time on other component curve will be modified.

Parameters:
  • seq (c4d.CCurve) – The curve the key belongs to.
  • inter (int) –

    The quaternion interpolation type to set:

    ROTATIONINTERPOLATION_QUATERNION_SLERP Quaternion Spherical LERP Interpolation (Linear).
    ROTATIONINTERPOLATION_QUATERNION_CUBIC Quaternion Smooth Cubic Interpolation (Formerly known as Losch).
  • bUndo (bool) – True to add the 3 rotation keys in the undo system. The caller has to to manage start/end of undo actions with BaseDocument.StartUndo()/EndUndo().
CKey.GetQuatInterpolation()

New in version R18.020.

Gets the quaternion interpolation type of the key.

Return type:int
Returns:The quaternion interpolation type:
ROTATIONINTERPOLATION_QUATERNION_SLERP Quaternion Spherical LERP Interpolation (Linear).
ROTATIONINTERPOLATION_QUATERNION_CUBIC Quaternion Smooth Cubic Interpolation (Formerly known as Losch).
CKey.GetTrack()

Get the track of this key.

Return type:c4d.CTrack
Returns:The track.
CKey.GetCurve()

Get the curve of this key.

Return type:c4d.CCurve
Returns:The curve.
CKey.FlushData()

Flush the key data.

CKey.SetGeData(seq, d)

Set the data of this key.

Parameters:
  • seq (c4d.CCurve) – The curve.
  • d (any) – The data.
CKey.GetGeData()

Get the data of this key.

Return type:Any
Returns:The data, depends on the key.
CKey.GetClone(trans=None)

Gets a clone of the key.

Parameters:trans (c4d.AliasTrans) –

New in version R17.032.

An optional alias translator for the operation.

Return type:c4d.CKey
Returns:The cloned key.
CKey.GetAutomaticTangentMode()

New in version R17.048.

Gets the AutoTangent mode of the key.

Return type:int
Returns:The AutoTangent mode:
CAUTOMODE_CLASSIC AutoTangent first implementation.
CAUTOMODE_FIXEDSLOPE AutoTangent with fixed slope for given time.
CKey.SetAutomaticTangentMode(seq, autoMode)

New in version R17.048.

Sets the AutoTangent mode of the key.

Parameters:
  • seq (c4d.CCurve) – The curve the key belongs to.
  • autoMode (int) –

    The AutoTangent mode to set:

    CAUTOMODE_CLASSIC AutoTangent first implementation.
    CAUTOMODE_FIXEDSLOPE AutoTangent with fixed slope for given time.
CKey.SetTimeLeftAdjustValue(seq, t)

New in version R17.048.

Sets Time Left and adjusts Value so the angle stays the same.

Parameters:
Return type:

bool

Returns:

True if successful. False if current Time Left is smaller than FLT_MIN and Value is not Zero (angle cannot stay the same).

CKey.SetTimeRightAdjustValue(seq, t)

New in version R17.048.

Sets Time Right and adjusts Value so the angle stays the same.

Parameters:
Return type:

bool

Returns:

True if successful. False if current Time Right is smaller than FLT_MIN and Value is not Zero (angle cannot stay the same).