CTrackData Class Reference

#include <c4d_ctrackdata.h>

Inheritance diagram for CTrackData:

Detailed Description

A data class for creating timeline track plugins.
Use RegisterCTrackPlugin() to register a track plugin.

Public Member Functions

virtual Bool Animate (CTrack *track, const CAnimInfo *info, Bool *chg, void *data)
 
virtual Int32 GuiMessage (CTrack *track, const BaseContainer &msg, BaseContainer &result)
 
virtual Bool Draw (CTrack *track, GeClipMap *map, const BaseTime &clip_left, const BaseTime &clip_right)
 
virtual Int32 GetHeight (CTrack *track)
 
virtual Bool FillKey (CTrack *track, BaseDocument *doc, BaseList2D *bl, CKey *key)
 
virtual Bool TrackInformation (CTrack *track, BaseDocument *doc, CKey *key, maxon::String *str, Bool set)
 
virtual Bool KeyMessage (CTrack *track, CKey *node, Int32 type, void *data)
 
virtual Bool KeyGetDDescription (CTrack *track, CKey *node, Description *description, DESCFLAGS_DESC &flags)
 
virtual Bool KeyGetDParameter (CTrack *track, CKey *node, const DescID &id, GeData &t_data, DESCFLAGS_GET &flags)
 
virtual Bool KeyGetDEnabling (CTrack *track, CKey *node, const DescID &id, const GeData &t_data, DESCFLAGS_ENABLE flags, const BaseContainer *itemdesc)
 
virtual Bool KeySetDParameter (CTrack *track, CKey *node, const DescID &id, const GeData &t_data, DESCFLAGS_SET &flags)
 
- Public Member Functions inherited from NodeData
 NodeData ()
 
GeListNodeGet (void) const
 
virtual Bool Message (GeListNode *node, Int32 type, void *data)
 
virtual void GetBubbleHelp (GeListNode *node, maxon::String &str)
 
virtual BaseDocumentGetDocument (GeListNode *node)
 
virtual Int32 GetBranchInfo (GeListNode *node, BranchInfo *info, Int32 max, GETBRANCHINFO flags)
 
virtual Bool IsInstanceOf (const GeListNode *node, Int32 type) const
 
virtual Bool IsDocumentRelated (const GeListNode *node, Bool &docrelated) const
 
virtual Bool Init (GeListNode *node)
 
virtual void Free (GeListNode *node)
 
virtual Bool Read (GeListNode *node, HyperFile *hf, Int32 level)
 
virtual Bool Write (GeListNode *node, HyperFile *hf)
 
virtual Bool CopyTo (NodeData *dest, GeListNode *snode, GeListNode *dnode, COPYFLAGS flags, AliasTrans *trn)
 
virtual Bool GetDDescription (GeListNode *node, Description *description, DESCFLAGS_DESC &flags)
 
virtual Bool GetDParameter (GeListNode *node, const DescID &id, GeData &t_data, DESCFLAGS_GET &flags)
 
virtual Bool SetDParameter (GeListNode *node, const DescID &id, const GeData &t_data, DESCFLAGS_SET &flags)
 
virtual Bool GetDEnabling (GeListNode *node, const DescID &id, const GeData &t_data, DESCFLAGS_ENABLE flags, const BaseContainer *itemdesc)
 
virtual Bool TranslateDescID (GeListNode *node, const DescID &id, DescID &res_id, C4DAtom *&res_at)
 
- Public Member Functions inherited from BaseData
 BaseData ()
 
virtual ~BaseData (void)
 
void Destructor (void)
 

Additional Inherited Members

- Protected Attributes inherited from NodeData
GeListNodeprivate_link
 

Member Function Documentation

◆ Animate()

virtual Bool Animate ( CTrack track,
const CAnimInfo info,
Bool chg,
void *  data 
)
virtual

Called during redraw or whenever Cinema 4D wants to evaluate the animation track.

Note
All times are given with respect to time curves for instance, so time might not be the same as doc->GetTime().
This function is called in a thread context. See the important information about threading.
Parameters
[in]trackEqual to static_cast<CTrack*>->Get(). Provided for speed and convenience. Cinema 4D owns the pointed track.
[in]infoThe animation parameters.
It is the responsibility of each track plugin to interpolate the values in info correctly.
[out]chgIf not nullptr, set it to true if the value has changed due to the animation.
[out]dataIf not nullptr, the animated value should not be applied to the object, but assigned to this parameter instead.
Returns
true if the track was animated successfully, otherwise false.

◆ GuiMessage()

virtual Int32 GuiMessage ( CTrack track,
const BaseContainer msg,
BaseContainer result 
)
virtual

Called to process GUI messages e.g. for drag-and-drop, drawing etc. Private.

See also
GeDialog::Message for more information.
Parameters
[in]trackEqual to static_cast<CTrack*>->Get(). Provided for speed and convenience. Cinema 4D owns the pointed track.
[in]msgThe message container.
[in,out]resultThe message result container.
Returns
The GUI message return value.

◆ Draw()

virtual Bool Draw ( CTrack track,
GeClipMap map,
const BaseTime clip_left,
const BaseTime clip_right 
)
virtual

Called to draw additional stuff, e.g. like the sound track draws a sound wave.

Note
Called when GetHeight() returns a positive height for the track of the sequence.
This function is called in a thread context. See the important information about threading.
Parameters
[in]trackEqual to static_cast<CTrack*>->Get(). Provided for speed and convenience. Cinema 4D owns the pointed track.
[out]mapThe clip map to draw to. Cinema 4D owns the pointed clip map.
[in]clip_leftThe left time clipping.
[in]clip_rightThe right time clipping.
Returns
true if the track was drawn successfully, otherwise false.

◆ GetHeight()

virtual Int32 GetHeight ( CTrack track)
virtual

Called to get the height to draw additional data for the sequence in the timeline, e.g. the sound wave of a sound track.
The default value is 0, which means no additional data.

Parameters
[in]trackEqual to static_cast<CTrack*>->Get(). Provided for speed and convenience. Cinema 4D owns the pointed track.
Returns
The extra height of the track in pixels.

◆ FillKey()

virtual Bool FillKey ( CTrack track,
BaseDocument doc,
BaseList2D bl,
CKey key 
)
virtual

Called to fill a newly created key with default values for object bl.

Parameters
[in]trackEqual to static_cast<CTrack*>->Get(). Provided for speed and convenience. Cinema 4D owns the pointed track.
[in]docThe document. Cinema 4D owns the pointed document.
[in]blThe object of the key. Cinema 4D owns the pointed object.
[out]keyThe key to fill. Cinema 4D owns the pointed key.
Returns
true if the key was filled successfully, otherwise false.

◆ TrackInformation()

virtual Bool TrackInformation ( CTrack track,
BaseDocument doc,
CKey key,
maxon::String str,
Bool  set 
)
virtual

Called to set (set=true) or get (set==false) information for a track at the current time (key==nullptr) or at a specified key. The information to get/set is available in str. The information is shown in the UI for example when hovering over a value.

Parameters
[in]trackEqual to static_cast<CTrack*>->Get(). Provided for speed and convenience. Cinema 4D owns the pointed track.
[in]docThe active document. Cinema 4D owns the pointed document.
[in]keyThe key that the information concerns or nullptr if the information concerns doc->GetTime(). Cinema 4D owns the pointed key.
[in,out]strThe string to get/set.
[in]settrue if the information should be set, otherwise false if it should be retrieved.
Returns
true if the track information was get/set successfully, otherwise false.

◆ KeyMessage()

virtual Bool KeyMessage ( CTrack track,
CKey node,
Int32  type,
void *  data 
)
virtual

Handles NodeData::Message for the key node.

Parameters
[in]trackEqual to static_cast<CTrack*>->Get(). Provided for speed and convenience. Cinema 4D owns the pointed track.
[in]nodeThe key node. Cinema 4D owns the pointed key.
[in]typeThe message type.
[in,out]dataThe message data.
Returns
true if successful, otherwise false.

◆ KeyGetDDescription()

virtual Bool KeyGetDDescription ( CTrack track,
CKey node,
Description description,
DESCFLAGS_DESC flags 
)
virtual

Handles NodeData::GetDDescription for the key node.

Parameters
[in]trackEqual to static_cast<CTrack*>->Get(). Provided for speed and convenience. Cinema 4D owns the pointed track.
[in]nodeThe key node. Cinema 4D owns the pointed key.
[in,out]descriptionThe description to add parameters to. Cinema 4D owns the pointed description.
[in,out]flagsThe flags for the description operation: DESCFLAGS_DESC
Returns
true if successful, otherwise false.

◆ KeyGetDParameter()

virtual Bool KeyGetDParameter ( CTrack track,
CKey node,
const DescID id,
GeData t_data,
DESCFLAGS_GET flags 
)
virtual

Handles NodeData::GetDParameter for the key node.

Parameters
[in]trackEqual to static_cast<CTrack*>->Get(). Provided for speed and convenience. Cinema 4D owns the pointed track.
[in]nodeThe key node. Cinema 4D owns the pointed key.
[in]idThe ID of the parameter.
[out]t_dataThe current data for the parameter.
[in,out]flagsThe flags for the description operation: DESCFLAGS_DESC
Returns
true if successful, otherwise false.

◆ KeyGetDEnabling()

virtual Bool KeyGetDEnabling ( CTrack track,
CKey node,
const DescID id,
const GeData t_data,
DESCFLAGS_ENABLE  flags,
const BaseContainer itemdesc 
)
virtual

Handles NodeData::GetDEnabling for the key node.

Parameters
[in]trackEqual to static_cast<CTrack*>->Get(). Provided for speed and convenience. Cinema 4D owns the pointed track.
[in]nodeThe key node. Cinema 4D owns the pointed key.
[in]idThe ID of the parameter.
[out]t_dataThe current data for the parameter.
[in,out]flagsThe flags for the description operation: DESCFLAGS_DESC
[in]itemdescThe description for the parameter, encoded to a container as described in Description.
Returns
true if successful, otherwise false.

◆ KeySetDParameter()

virtual Bool KeySetDParameter ( CTrack track,
CKey node,
const DescID id,
const GeData t_data,
DESCFLAGS_SET flags 
)
virtual

Handles NodeData::SetDParameter for the key node.

Parameters
[in]trackEqual to static_cast<CTrack*>->Get(). Provided for speed and convenience. Cinema 4D owns the pointed track.
[in]nodeThe key node. Cinema 4D owns the pointed key.
[in]idThe ID of the parameter.
[in]t_dataThe data for the parameter.
[in,out]flagsThe flags for the description operation: DESCFLAGS_DESC
Returns
true if successful, otherwise false.