TagData Class Reference

#include <c4d_tagdata.h>

Inheritance diagram for TagData:

Detailed Description

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

Use RegisterTagPlugin() to register a tag plugin.

Public Member Functions

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 Matrix &op_mg, Float lod, Int32 flags, BaseThread *thread)
 
- Public Member Functions inherited from NodeData
 NodeData ()
 
GeListNodeGet () 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 Destructor ()
 

Additional Inherited Members

- Protected Attributes inherited from NodeData
GeListNodeprivate_link
 

Member Function Documentation

◆ 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.

Note
This function is called in a thread context. See the important information about threading.
To get the current drawpass call bd->GetDrawPass().
Warning
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.
Parameters
[in]tagThe BaseTag connected with the TagData instance. Equal to static_cast<TagData*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed shader.
[in]opThe host object of the tag. Cinema 4D owns the pointed object.
[in]bdThe editor's view. The caller owns the pointed view.
[in]bhThe helper for the editor's view. The caller owns the pointed base draw helper.
Returns
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.

Note
This function is called in a thread context. See the important information about threading.
Parameters
[in]tagThe BaseTag connected with the TagData instance. Equal to static_cast<TagData*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed shader.
[in]docThe host document of the tag. Cinema 4D owns the pointed document.
[in]opThe host object of the tag. Cinema 4D owns the pointed object.
[in]btThe calling thread. Can be nullptr. Cinema 4D owns the pointed thread.
[in]priorityThe priority of the call to Execute() in the pipeline: EXECUTIONPRIORITY
[in]flagsThe execution flags: EXECUTIONFLAGS
Returns
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:

#define EXECUTIONPRIORITY_ANIMATION
Animation.
Definition: ge_prepass.h:3877
#define EXECUTIONPRIORITY_GENERATOR
Generators.
Definition: ge_prepass.h:3881
PyWideStringList * list
Definition: initconfig.h:447
PyObject * op
Definition: object.h:520

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

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

◆ GetModifiedObjects()

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

Private.