#include <mesh_attribute_base.h>
CustomDataTagDisplayInterface can be optionally implemented for each CustomDataTagClassInterface implementation and defines if and how a CustomDataTag should be displayed in the viewport.
|
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 (const 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 () |
|
◆ MAXON_INTERFACE()
◆ Init()
Initializes the class after creation.
- Parameters
-
[in] | tag | The tag that owns the attributes. |
- Returns
- OK on success.
◆ Draw()
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] | tag | The BaseTag connected with the TagData instance. Equal to static_cast <TagData*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed tag. |
[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 view helper. |
- Returns
- OK on success.
◆ DisplayControl()
Sets information about how the active object should be displayed.
- Parameters
-
[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 tag. |
[in] | doc | The active document. Cinema 4D owns the pointed document. |
[in] | op | The active object. Cinema 4D owns the pointed object. |
[in] | bd | The active editor view. Cinema 4D owns the pointed base draw. |
[in] | bh | The helper for active the editor view. The caller owns the pointed view helper. |
[in] | cds | The display control settings. |
- Returns
- OK on success.
◆ InitDisplayControl()
Initializes resources for the display control used in DisplayControl.
- Parameters
-
[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 tag. |
[in] | doc | The active document. Cinema 4D owns the pointed document. |
[in] | bd | The active editor view. Cinema 4D owns the pointed base draw. |
[in] | active | The active objects array. Cinema 4D owns the pointed array. |
- Returns
- OK on success.
◆ FreeDisplayControl()
Frees resources allocated by InitDisplayControl.
- Parameters
-
[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 tag. |
◆ Reset()
Resets any local data before destroying the class instance.