A CKey represents a key of an animation track. CKey objects are stored in a CCurve which in return is stored in a CTrack object.
CKey objects are an instance of CKbase
.
CKey objects are accessed via the host CCurve:
See CCurve Manual.
The host objects are accessed with:
A CKey object can be created with the usual tools:
But typically keys are created using the host CCurve:
Keys can also be created using auto key functionality of the BaseDocument:
The default settings of a key are defined in the BaseDocument:
See also BaseDocument Animate.
CKey objects are manipulated with the host CCurve object.
The parameters of a key can be edited as usual with C4DAtom::SetParameter() and C4DAtom::GetParameter(). The parameter IDs are defined in ckvalue.h
.
In Cinema 4D there can be up to four Timeline windows. A key can be selected in one or multiple of these windows. The selection state is stored as a bit:
An animation key is defined by its position in time:
See also BaseTime Manual.
An animation key defines a certain value at a certain time:
See also CTrack Read-Only Properties and CCurve Animation.
A key also defines the local tangents. These tangents influence the interpolation between the keys.
The modes are:
The left and right tangents are defined by two points. These two points are defined by time and value.
The time property of the tangents can be accessed with:
The value property of the tangents can be accessed with:
The left and right tangent can be adjusted with:
There are different ways to interpolate between the values of the animation keys. The interpolation from one key to the next is defined per key:
Interpolation modes are:
Quaternion interpolation can be used on the rotation of a BaseObject. The kind of interpolation can be refined per key.
See also BaseObject Quaternion Rotation Mode.
Several presets exist to manage the clamp, slope and overshoot behaviour of a key.
The preset modes are:
A new CKey can be created by copying an existing one.
The data stored in a key can easily be flushed.
The boolean parameters of a key are stored internally as bits. These bits can be edited directly.
See also Parameters.