CustomDataTagDisplayInterface Class Reference

#include <mesh_attribute_base.h>

Inheritance diagram for CustomDataTagDisplayInterface:

Detailed Description

CustomDataTagDisplayInterface can be optionally implemented for each CustomDataTagClassInterface implementation and defines if and how a CustomDataTag should be displayed in the viewport.

Public Member Functions

MAXON_METHOD Result< void > Init (BaseTag *tag)
 
MAXON_METHOD Result< void > Draw (BaseTag *tag, BaseObject *op, BaseDraw *bd, BaseDrawHelp *bh)
 
MAXON_METHOD Result< void > DisplayControl (BaseTag *tag, BaseDocument *doc, BaseObject *op, BaseDraw *bd, BaseDrawHelp *bh, ControlDisplayStruct &cds) const
 
MAXON_METHOD Result< void > InitDisplayControl (BaseTag *tag, BaseDocument *doc, BaseDraw *bd, const AtomArray *active)
 
MAXON_METHOD void FreeDisplayControl (BaseTag *tag)
 
MAXON_METHOD void Reset ()
 

Private Member Functions

 MAXON_INTERFACE (CustomDataTagDisplayInterface, MAXON_REFERENCE_NORMAL, "net.maxon.mesh_misc.interface.customdatatagdisplay")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( CustomDataTagDisplayInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.mesh_misc.interface.customdatatagdisplay"   
)
private

◆ Init()

MAXON_METHOD Result<void> Init ( BaseTag tag)

Initializes the class after creation.

Parameters
[in]tagThe tag that owns the attributes.
Returns
OK on success.

◆ Draw()

MAXON_METHOD Result<void> Draw ( BaseTag tag,
BaseObject op,
BaseDraw bd,
BaseDrawHelp bh 
)

Draws the visual representation of the tag data in 3D views.

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 tag.
[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 view helper.
Returns
OK on success.

◆ DisplayControl()

MAXON_METHOD Result<void> DisplayControl ( BaseTag tag,
BaseDocument doc,
BaseObject op,
BaseDraw bd,
BaseDrawHelp bh,
ControlDisplayStruct cds 
) const

Sets information about how the active object should be displayed.

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 tag.
[in]docThe active document. Cinema 4D owns the pointed document.
[in]opThe active object. Cinema 4D owns the pointed object.
[in]bdThe active editor view. Cinema 4D owns the pointed base draw.
[in]bhThe helper for active the editor view. The caller owns the pointed view helper.
[in]cdsThe display control settings.
Returns
OK on success. @MAXON_ANNOTATION{methodId="DisplayControl@d0b1f370a50b32b0"->"DisplayControl@173f8bfb6029a6ca"}

◆ InitDisplayControl()

MAXON_METHOD Result<void> InitDisplayControl ( BaseTag tag,
BaseDocument doc,
BaseDraw bd,
const AtomArray active 
)

Initializes resources for the display control used in DisplayControl.

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 tag.
[in]docThe active document. Cinema 4D owns the pointed document.
[in]bdThe active editor view. Cinema 4D owns the pointed base draw.
[in]activeThe active objects array. Cinema 4D owns the pointed array.
Returns
OK on success.

◆ FreeDisplayControl()

MAXON_METHOD void FreeDisplayControl ( BaseTag tag)

Frees resources allocated by InitDisplayControl.

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

◆ Reset()

MAXON_METHOD void Reset ( )

Resets any local data before destroying the class instance.