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 (const BaseTag *tag, const BaseDocument *doc, BaseObject *&op, Bool &pluginownedop, const Matrix &op_mg, Float lod, Int32 flags, BaseThread *thread) const
 
virtual Bool GetModifiedMatrix (const BaseTag *tag, const BaseDocument *doc, BaseObject *&op, const Matrix &op_mg, const Matrix &op_ml, maxon::Opt< Matrix > &deformMatrix, Float lod, Int32 flags, BaseThread *thread) const
 
- Public Member Functions inherited from NodeData
 NodeData ()
 
GeListNodeGet ()
 
const GeListNodeGet () const
 
virtual Bool Message (GeListNode *node, Int32 type, void *data)
 
virtual void GetBubbleHelp (GeListNode *node, maxon::String &str)
 
virtual const BaseDocumentGetDocument (const GeListNode *node) const
 
virtual maxon::Result< BoolGetBranchInfo (const GeListNode *node, const maxon::ValueReceiver< const BranchInfo & > &info, GETBRANCHINFO flags) const
 
virtual Bool IsInstanceOf (const GeListNode *node, Int32 type) const
 
virtual Bool IsDocumentRelated (const GeListNode *node, Bool &docrelated) const
 
virtual maxon::Result< BoolGetAccessedObjects (const BaseList2D *node, METHOD_ID method, AccessedObjectsCallback &access) const
 
virtual maxon::Result< maxon::GenericDataGroupChanges (BaseList2D *node)
 
virtual Bool Init (GeListNode *node, Bool isCloneInit)
 
virtual void Free (GeListNode *node)
 
virtual Bool Read (GeListNode *node, HyperFile *hf, Int32 level)
 
virtual Bool Write (const GeListNode *node, HyperFile *hf) const
 
virtual Bool CopyTo (NodeData *dest, const GeListNode *snode, GeListNode *dnode, COPYFLAGS flags, AliasTrans *trn) const
 
virtual Bool GetDDescription (const GeListNode *node, Description *description, DESCFLAGS_DESC &flags) const
 
virtual Bool GetDParameter (const GeListNode *node, const DescID &id, GeData &t_data, DESCFLAGS_GET &flags) const
 
virtual Bool SetDParameter (GeListNode *node, const DescID &id, const GeData &t_data, DESCFLAGS_SET &flags)
 
virtual Bool GetDEnabling (const GeListNode *node, const DescID &id, const GeData &t_data, DESCFLAGS_ENABLE flags, const BaseContainer *itemdesc) const
 
virtual Bool TranslateDescID (GeListNode *node, const DescID &id, DescID &res_id, C4DAtom *&res_at)
 
- Public Member Functions inherited from 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:3888
#define EXECUTIONPRIORITY_GENERATOR
Generators.
Definition: ge_prepass.h:3892
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 ( const BaseTag tag,
const BaseDocument doc,
BaseObject *&  op,
Bool pluginownedop,
const Matrix op_mg,
Float  lod,
Int32  flags,
BaseThread thread 
) const
virtual

Private.

◆ GetModifiedMatrix()

virtual Bool GetModifiedMatrix ( const BaseTag tag,
const BaseDocument doc,
BaseObject *&  op,
const Matrix op_mg,
const Matrix op_ml,
maxon::Opt< Matrix > &  deformMatrix,
Float  lod,
Int32  flags,
BaseThread thread 
) const
virtual

Private.