c4d.CKey

class c4d.CKey

This is the animation key base class.

Methods Signatures

CKey.GetTime(self)

Get the time of this key.

CKey.GetTimeLeft(self)

Get the left time of this key.

CKey.GetTimeRight(self)

Get the left time of this key.

CKey.GetValue(self)

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

CKey.GetValueLeft(self)

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

CKey.GetValueRight(self)

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

CKey.SetValue(self, seq, v)

Set the value of this key.

CKey.SetValueLeft(self, seq, v)

Set the left value of this key.

CKey.SetValueRight(self, seq, v)

Set the right value of this key.

CKey.SetTime(self, seq, t)

Set the time of this key.

CKey.SetTimeLeft(self, seq, t)

Set the left time of this key.

CKey.SetTimeRight(self, seq, t)

Set the right time of this key.

CKey.SetInterpolation(self, seq, inter)

Set the interpolation type of this key.

CKey.GetInterpolation(self)

Returns the interpolation type.

CKey.SetQuatInterpolation(self, seq, inter[, bUndo])

Sets the quaternion interpolation type of the key.

CKey.GetQuatInterpolation(self)

Gets the quaternion interpolation type of the key.

CKey.GetTrack(self)

Get the track of this key.

CKey.GetCurve(self)

Get the curve of this key.

CKey.FlushData(self)

Flush the key data.

CKey.SetGeData(self, seq, d)

Set the data of this key.

CKey.GetGeData(self)

Get the data of this key.

CKey.GetClone(self[, trans])

Gets a clone of the key.

CKey.GetAutomaticTangentMode(self)

Gets the AutoTangent mode of the key.

CKey.SetAutomaticTangentMode(self, seq, autoMode)

Sets the AutoTangent mode of the key.

CKey.SetTimeLeftAdjustValue(self, seq, t)

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

CKey.SetTimeRightAdjustValue(self, seq, t)

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

Inheritance

Parent Class:

Methods Documentation

CKey.GetTime(self)

Get the time of this key.

Return type

c4d.BaseTime

Returns

The time.

CKey.GetTimeLeft(self)

Get the left time of this key.

Return type

c4d.BaseTime

Returns

The left time.

CKey.GetTimeRight(self)

Get the left time of this key.

Return type

c4d.BaseTime

Returns

The right time.

CKey.GetValue(self)

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

Return type

float

Returns

The value.

CKey.GetValueLeft(self)

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

Return type

float

Returns

The value.

CKey.GetValueRight(self)

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

Return type

float

Returns

The value.

CKey.SetValue(self, seq, v)

Set the value of this key.

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

  • v (float) – The new value.

CKey.SetValueLeft(self, seq, v)

Set the left value of this key.

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

  • v (float) – The new value.

CKey.SetValueRight(self, seq, v)

Set the right value of this key.

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

  • v (float) – The new value.

CKey.SetTime(self, seq, t)

Set the time of this key.

Parameters
CKey.SetTimeLeft(self, seq, t)

Set the left time of this key.

Parameters
CKey.SetTimeRight(self, seq, t)

Set the right time of this key.

Parameters
CKey.SetInterpolation(self, 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(self)

Returns the interpolation type.

Return type

int

Returns

The interpolation type:

CINTERPOLATION_SPLINE

Spline.

CINTERPOLATION_LINEAR

Linear

CINTERPOLATION_STEP

Step.

CKey.SetQuatInterpolation(self, seq, inter, bUndo=True)

Sets the quaternion interpolation type of the key.

New in version R18.020.

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(self)

Gets the quaternion interpolation type of the key.

New in version R18.020.

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(self)

Get the track of this key.

Return type

c4d.CTrack

Returns

The track.

CKey.GetCurve(self)

Get the curve of this key.

Return type

c4d.CCurve

Returns

The curve.

CKey.FlushData(self)

Flush the key data.

CKey.SetGeData(self, seq, d)

Set the data of this key.

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

  • d (any) – The data.

CKey.GetGeData(self)

Get the data of this key.

Return type

Any

Returns

The data, depends on the key.

CKey.GetClone(self, 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(self)

Gets the AutoTangent mode of the key.

New in version R17.048.

Return type

int

Returns

The AutoTangent mode:

CAUTOMODE_CLASSIC

AutoTangent first implementation.

CAUTOMODE_FIXEDSLOPE

AutoTangent with fixed slope for given time.

CKey.SetAutomaticTangentMode(self, seq, autoMode)

Sets the AutoTangent mode of the key.

New in version R17.048.

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(self, seq, t)

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

New in version R17.048.

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(self, seq, t)

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

New in version R17.048.

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).