About
A CCurve represents an animation curve that stores and interpolates animation keys. A CCurve is stored in a CTrack object.
CCurve objects are an instance of CSbase
.
while (track != nullptr)
{
if (curve == nullptr)
continue;
{
{
}
}
}
Py_ssize_t i
Definition: abstract.h:645
PyObject * key
Definition: abstract.h:289
const CTrack * GetFirstCTrack() const
Definition: c4d_baselist.h:2870
Definition: c4d_canimation.h:366
const CKey * GetKey(Int32 index) const
Definition: c4d_canimation.h:388
Int32 GetKeyCount() const
Definition: c4d_canimation.h:381
Represents a key in the CCurve of a track which represent the animation of a parameter.
Definition: c4d_canimation.h:58
Definition: c4d_canimation.h:671
CTrack * GetNext() const
Definition: c4d_canimation.h:716
CCurve * GetCurve(CCURVE type=CCURVE::CURVE, Bool bCreate=true)
Definition: c4d_canimation.h:835
maxon::Int32 Int32
Definition: ge_sys_math.h:56
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:204
Access
CCurve objects cannot be created on their own. They are created with a CTrack that contains the CCurve object.
Keys
Access Keys
The CCurve objects stores the animation keys and provides access to these:
if (leftKey)
{
}
Definition: c4d_basetime.h:25
const CKey * FindKey(const BaseTime &time, Int32 *idx=nullptr, FINDANIM match=FINDANIM::EXACT) const
Definition: c4d_canimation.h:404
void SetTime(CCurve *seq, const BaseTime &t)
Definition: c4d_canimation.h:96
const char * doc
Definition: pyerrors.h:226
Add Keys
A CCurve object can create and receive keys:
{
if (curve->
AddKey(keyTime,
nullptr) ==
nullptr)
keyTime = keyTime + stepTime;
}
CKey * AddKey(const BaseTime &time, Int32 *nidx=nullptr, Bool bUndo=false, Bool SynchronizeKeys=false)
Definition: c4d_canimation.h:423
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
const char Py_ssize_t const char Py_ssize_t Py_ssize_t max
Definition: modsupport.h:59
const char Py_ssize_t const char Py_ssize_t min
Definition: modsupport.h:58
PyObject PyObject * step
Definition: sliceobject.h:34
See also CKey Allocation/Deallocation.
Handle Keys
A CCurve object can be used to manipulate its keys:
if (newKey == nullptr)
void SetKeyDefault(BaseDocument *doc, Int32 kidx)
Bool FillKey(BaseDocument *doc, BaseList2D *bl, CKey *key)
Definition: c4d_canimation.h:821
PyObject * obj
Definition: complexobject.h:60
Py_ssize_t * index
Definition: abstract.h:374
Unmuted Keys
A key can be muted so it is ignored.
{
const Float time =
key->GetTime().Get();
}
const CKey * FindNextUnmuted(Int32 idx, Int32 *ret_idx=nullptr) const
Definition: c4d_canimation.h:599
static String FloatToString(Float32 v, Int32 vvk=-1, Int32 nnk=-3)
Definition: c4d_string.h:531
maxon::Float Float
Definition: ge_sys_math.h:62
See also CKey Bits.
Animation
The interpolation between the keys defines the dynamics of an animation. This interpolation is refined with the tangents.
- CCurve::CalcHermite(): Calculates the Hermite spline between two sets of key values.
- CCurve::CalcSoftTangents(): Calculates the soft tangents (i.e. auto interpolation) around the key of the given index.
- CCurve::GetTangents(): Computes the tangents of a key, taking into account all options like zero slope, link slope etc.
- CCurve::GetValue(): Returns the value calculated at the given time, taking into account things like time curves.
{
}
PyObject * value
Definition: abstract.h:715
Float GetValue(const BaseTime &time) const
Definition: c4d_canimation.h:538
Time
A CCurve is confined by a first and a last key:
BaseTime GetStartTime() const
Definition: c4d_canimation.h:580
BaseTime GetEndTime() const
Definition: c4d_canimation.h:586
PyObject PyObject Py_ssize_t start
Definition: complexobject.h:62
PyObject PyObject Py_ssize_t Py_ssize_t end
Definition: complexobject.h:63
Further Reading