CTrackData Class Reference

#include <c4d_ctrackdata.h>

Inheritance diagram for CTrackData:

详细描述

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

公共成员函数

virtual Bool   动画 ( 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, 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 ()
GeListNode Get (void) const
virtual Bool   消息 ( GeListNode *node, Int32 type, void *data)
virtual void  GetBubbleHelp ( GeListNode *node, maxon::String &str)
virtual BaseDocument GetDocument ( 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   读取 ( 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, 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
GeListNode private_link

成员函数文档编制

◆  Animate()

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

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

注意
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.
参数
[in] track Equal to static_cast<CTrack*>->Get() . Provided for speed and convenience. Cinema 4D owns the pointed track.
[in] info The animation parameters.
It is the responsibility of each track plugin to interpolate the values in info correctly.
[out] chg If not nullptr , set it to true if the value has changed due to the animation.
[out] data If not nullptr , the animated value should not be applied to the object, but assigned to this parameter instead.
返回
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 .

另请参阅
GeDialog::Message 了解更多信息。
参数
[in] track Equal to static_cast<CTrack*>->Get() . Provided for speed and convenience. Cinema 4D owns the pointed track.
[in] msg The message container.
[in,out] result The message result container.
返回
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.

注意
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.
参数
[in] track Equal to static_cast<CTrack*>->Get() . Provided for speed and convenience. Cinema 4D owns the pointed track.
[out] map The clip map to draw to. Cinema 4D owns the pointed clip map.
[in] clip_left The left time clipping.
[in] clip_right The right time clipping.
返回
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.

参数
[in] track Equal to static_cast<CTrack*>->Get() . Provided for speed and convenience. Cinema 4D owns the pointed track.
返回
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 .

参数
[in] track Equal to static_cast<CTrack*>->Get() . Provided for speed and convenience. Cinema 4D owns the pointed track.
[in] doc The document. Cinema 4D owns the pointed document.
[in] bl The object of the key. Cinema 4D owns the pointed object.
[out] key The key to fill. Cinema 4D owns the pointed key.
返回
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.

参数
[in] track Equal to static_cast<CTrack*>->Get() . Provided for speed and convenience. Cinema 4D owns the pointed track.
[in] doc The active document. Cinema 4D owns the pointed document.
[in] key The key that the information concerns or nullptr if the information concerns doc->GetTime() . Cinema 4D owns the pointed key.
[in,out] str The string to get/set.
[in] set true if the information should be set, otherwise false if it should be retrieved.
返回
true if the track information was get/set successfully, otherwise false .

◆  KeyMessage()

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

处理 NodeData::Message for the key node .

参数
[in] track Equal to static_cast<CTrack*>->Get() . Provided for speed and convenience. Cinema 4D owns the pointed track.
[in] node The key node. Cinema 4D owns the pointed key.
[in] type The message type.
[in,out] data The message data.
返回
true if successful, otherwise false .

◆  KeyGetDDescription()

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

处理 NodeData::GetDDescription for the key node .

参数
[in] track Equal to static_cast<CTrack*>->Get() . Provided for speed and convenience. Cinema 4D owns the pointed track.
[in] node The key node. Cinema 4D owns the pointed key.
[in,out] description The description to add parameters to. Cinema 4D owns the pointed description.
[in,out] flags The flags for the description operation: DESCFLAGS_DESC
返回
true if successful, otherwise false .

◆  KeyGetDParameter()

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

处理 NodeData::GetDParameter for the key node .

参数
[in] track Equal to static_cast<CTrack*>->Get() . Provided for speed and convenience. Cinema 4D owns the pointed track.
[in] node The key node. Cinema 4D owns the pointed key.
[in] id The ID of the parameter.
[out] t_data The current data for the parameter.
[in,out] flags The flags for the description operation: DESCFLAGS_DESC
返回
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

处理 NodeData::GetDEnabling for the key node .

参数
[in] track Equal to static_cast<CTrack*>->Get() . Provided for speed and convenience. Cinema 4D owns the pointed track.
[in] node The key node. Cinema 4D owns the pointed key.
[in] id The ID of the parameter.
[out] t_data The current data for the parameter.
[in,out] flags The flags for the description operation: DESCFLAGS_DESC
[in] itemdesc The description for the parameter, encoded to a container as described in 描述 .
返回
true if successful, otherwise false .

◆  KeySetDParameter()

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

处理 NodeData::SetDParameter for the key node .

参数
[in] track Equal to static_cast<CTrack*>->Get() . Provided for speed and convenience. Cinema 4D owns the pointed track.
[in] node The key node. Cinema 4D owns the pointed key.
[in] id The ID of the parameter.
[in] t_data The data for the parameter.
[in,out] flags The flags for the description operation: DESCFLAGS_DESC
返回
true if successful, otherwise false .