TagData Class Reference

#include <c4d_tagdata.h>

Inheritance diagram for TagData:

详细描述

A data class for creating tag plugins.
Tag plugins appear in the Tag menu of the Object Manager and can be attached to objects.

使用 RegisterTagPlugin() to register a tag plugin.

公共成员函数

virtual Bool   Draw ( BaseTag *tag, BaseObject *op, BaseDraw *bd, BaseDrawHelp *bh)
virtual EXECUTIONRESULT   Execute ( BaseTag *tag, BaseDocument *doc, BaseObject *op, BaseThread *bt, Int32 priority, EXECUTIONFLAGS flags)
virtual Bool   AddToExecution ( BaseTag *tag, PriorityList *list)
virtual Bool   GetModifiedObjects ( BaseTag *tag, BaseDocument *doc, BaseObject *&op, Bool &pluginownedop, const 矩阵 &op_mg, Float lod, Int32 flags, BaseThread *thread)
-  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

成员函数文档编制

◆  Draw()

virtual Bool Draw ( BaseTag tag ,
BaseObject op ,
BaseDraw bd ,
BaseDrawHelp bh  
)
virtual

Called when the display is updated to draw visual elements of the tag in the 3D view.

注意
This function is called in a thread context. See the important information about threading.
To get the current drawpass call bd -> GetDrawPass() .
警告
Only draw in DRAWPASS::HIGHLIGHTS if you really know what you are doing. Otherwise always check the drawpass and then do not draw if it is DRAWPASS::HIGHLIGHTS .
参数
[in] tag The BaseTag connected with the TagData instance. Equal to static_cast < TagData *> Get() . Provided for speed and convenience. Cinema 4D owns the pointed shader.
[in] op The host object of the tag. Cinema 4D owns the pointed object.
[in] bd The editor's view. The caller owns the pointed view.
[in] bh The helper for the editor's view. The caller owns the pointed base draw helper.
返回
true if successful, otherwise false .

◆  Execute()

virtual EXECUTIONRESULT Execute ( BaseTag tag ,
BaseDocument doc ,
BaseObject op ,
BaseThread bt ,
Int32   priority ,
EXECUTIONFLAGS   flags  
)
virtual

Called at the point in the priority pipeline specified by AddToExecution , or the lack thereof.

注意
This function is called in a thread context. See the important information about threading.
参数
[in] tag The BaseTag connected with the TagData instance. Equal to static_cast < TagData *> Get() . Provided for speed and convenience. Cinema 4D owns the pointed shader.
[in] doc The host document of the tag. Cinema 4D owns the pointed document.
[in] op The host object of the tag. Cinema 4D owns the pointed object.
[in] bt The calling thread. Can be nullptr . Cinema 4D owns the pointed thread.
[in] priority The priority of the call to Execute() in the pipeline: EXECUTIONPRIORITY
[in] flags The execution flags: EXECUTIONFLAGS
返回
The execution result: EXECUTIONRESULT

◆  AddToExecution()

virtual Bool AddToExecution ( BaseTag tag ,
PriorityList list  
)
virtual

Called to add execution priorities.
By default returns false . In that case Cinema 4D will call Execute() at the priority specified by the user in the EXPRESSION_PRIORITY parameter of the container.
If overridden then insert points of execution in the list and return true . Heres is an example:

list->Add(op, EXECUTIONPRIORITY_ANIMATION , EXECUTIONFLAGS::NONE ); list->Add(op, EXECUTIONPRIORITY_GENERATOR , EXECUTIONFLAGS::NONE );

Cinema 4D will then call Execute() 2 times.

参数
[in] tag The BaseTag connected with the TagData instance. Equal to static_cast < TagData *> Get() . Provided for speed and convenience. Cinema 4D owns the pointed shader.
[in] list The priority list to add execution points to. Cinema 4D owns the pointed priority list.
返回
true if priority was added to the execution list, otherwise false .

◆  GetModifiedObjects()

virtual Bool GetModifiedObjects ( BaseTag tag ,
BaseDocument doc ,
BaseObject *&  op ,
Bool pluginownedop ,
const 矩阵 op_mg ,
Float   lod ,
Int32   flags ,
BaseThread thread  
)
virtual

Private .

EXECUTIONFLAGS::NONE
@ NONE
None.
EXECUTIONPRIORITY_ANIMATION
#define EXECUTIONPRIORITY_ANIMATION
Animation.
定义: ge_prepass.h:3623
EXECUTIONPRIORITY_GENERATOR
#define EXECUTIONPRIORITY_GENERATOR
Generators.
定义: ge_prepass.h:3627