c4d.CTrack

This is the animation track base class. Contains CCurve that contain CKeys. A BaseList2D can host a CTrack object. This can be the position, rotation or custom value track. These tracks contain a CCurve which contains CKeys.

Inheritance

Members

CTrack.__init__(bl, id)

Allocates a track object.

Parameters:
  • bl (BaseList2D) – Object to allocate the track for.
  • id (DescID) –

    Description ID to allocate the track for. For instance a position track will be allocated like this:

    tr=c4d.CTrack(op, c4d.DescID(c4d.DescLevel(c4d.ID_BASEOBJECT_POSITION, c4d.DTYPE_VECTOR, 0, ), c4d.DescLevel(c4d.VECTOR_X, c4d.DTYPE_REAL. 0)))

A track of type int will be allocated like this:

tr=c4d.CTrack(op, c4d.DescID(c4d.DescLevel(c4d.ID_BASEOBJECT_VISIBILITY_EDITOR, c4d.DTYPE_LONG, 0, )))

For a plugin and special tracks you pass the ID:

tr=c4d.CTrack(op,c4d.DescLevel(ID, ID, 0))

IDs for CINEMA’s special tracks are:

CTpla PLA track.
CTsound Sound track.
CTmorph Morph track.
CTtime Time track.
CTrack.GetCurve()

Get a curve of this track.

Return type: CCurve
Returns: Returns the curve of this track.
CTrack.GetTrackCategory()

Get a curve of this track.

Return type: int
Returns: Track category
CTRACK_CATEGORY_VALUE Value track.
CTRACK_CATEGORY_DATA Data track.
CTRACK_CATEGORY_PLUGIN Plugin track.
CTrack.GetObject()

The the host object of this track.

Return type: BaseList2D
Returns: The host object or None.
CTrack.GetBefore()

Get the pre track loop type of this track.

Return type: int
Returns: Loop type:
CLOOP_OFF No loop.
CLOOP_CONSTANT Constant
CLOOP_CONTINUE Continue.
CLOOP_REPEAT Repeat.
CLOOP_OFFSETREPEAT Offset repeat
CLOOP_OSCILLATE Oscillate
CTrack.GetAfter()

Get the pre track loop type of this track.

Return type: int
Returns: Loop type:
CLOOP_OFF No loop.
CLOOP_CONSTANT Constant
CLOOP_CONTINUE Continue.
CLOOP_REPEAT Repeat.
CLOOP_OFFSETREPEAT Offset repeat
CLOOP_OSCILLATE Oscillate
CTrack.SetBefore(type)

Set the pre track loop type of this track.

Parameters: type (int) –

Loop type:

CLOOP_OFF No loop.
CLOOP_CONSTANT Constant
CLOOP_CONTINUE Continue.
CLOOP_REPEAT Repeat.
CLOOP_OFFSETREPEAT Offset repeat
CLOOP_OSCILLATE Oscillate
CTrack.SetAfter(type)

Set the post track loop type of this track.

Parameters: type (int) –

Loop type:

CLOOP_OFF No loop.
CLOOP_CONSTANT Constant
CLOOP_CONTINUE Continue.
CLOOP_REPEAT Repeat.
CLOOP_OFFSETREPEAT Offset repeat
CLOOP_OSCILLATE Oscillate
CTrack.Flush()

Clears the data of the track itself, for example removes time curves, pre/post loop type, etc.

CTrack.GetHeight()

Get the height of the track.

Return type: int
Returns: The height in pixels.
CTrack.GetFCurveHeight(id)

Get the height of the mini f-curves in the timeline.

Parameters: id (int) – 0-3 for one of the four timelines.
Return type: int
Returns: The height of the mini f-curve in pixels.
CTrack.SetFCurveHeight(id, size)

Get the height of the track.

Parameters:
  • id (int) – 0-3 for one of the four timelines.
  • size (int) – The new size of the mini f-curve in pixels.

Table Of Contents