maxon.CustomDataTagClassInterface

Description

maxon.CustomDataTagClassInterface uses maxon.MeshAttributeClassInterface as a base interface and allows to add information and functionality to the mesh attribute to be used as tag.

It mainly contains the information about the c4d.CustomDataTag registration, read/write, icons and the optional display implementation.

Inheritance diagram

Inheritance

Parent Class:

Child Class:

Methods Signature

GetDefaultResourceId()

By default, all implementations provide a standard UI.

GetDisplayClassId()

Get maxon.Id Id of the display implementation or an empty maxon.Id if display is not implemented.

GetIcon(perPolyVertex)

Gets the icon id according to the data location (per vertex vs.

GetResourceId()

Returns the resource id for the Tag.

GetTagPluginId()

Returns the Tag plugin ID to be registered with this implementation.

GetTagPluginLevel()

Returns the Tag level to be used as data versioning system.

GetTagPluginName()

Returns the Tag string name to be registered with this implementation.

IsSdsCompatible(floatSize)

Returns if the maxon.DataType is compatible with the SDS interpolation.

Read(data, hf, level)

Reads a single data entry from a file.

Write(data, hf)

param data

The data pointer.

Methods Definition

static CustomDataTagClassInterface.GetDefaultResourceId()

By default, all implementations provide a standard UI. Gets the default resource id in case a custom AM UI is not needed.

Returns

The description string identifier.

Return type

str

CustomDataTagClassInterface.GetDisplayClassId()

Get maxon.Id Id of the display implementation or an empty maxon.Id if display is not implemented.

Returns

The id of the associated display implementation.

Return type

maxon.Id

CustomDataTagClassInterface.GetIcon(perPolyVertex)

Gets the icon id according to the data location (per vertex vs. per polyvertex).

Parameters

perPolyVertex (bool) – If True the polyvertex icon id is returned.

Returns

The icon id or c4d.NOTOK if there is no icon.

CustomDataTagClassInterface.GetResourceId()

Returns the resource id for the Tag.

Returns

A string that represent the tag res ID.

Return type

str

CustomDataTagClassInterface.GetTagPluginId()

Returns the Tag plugin ID to be registered with this implementation.

Returns

A unique plugin ID.

Return type

int

CustomDataTagClassInterface.GetTagPluginLevel()

Returns the Tag level to be used as data versioning system.

Returns

The disk level.

Return type

int

CustomDataTagClassInterface.GetTagPluginName()

Returns the Tag string name to be registered with this implementation.

Returns

A string that represent the tag in the interface.

Return type

str

CustomDataTagClassInterface.IsSdsCompatible(floatSize)
Returns if the maxon.DataType is compatible with the SDS interpolation.
SDS implementations, both internal and OSD, are only able to interpolate float values.

The floatSize allows to define how many values are used for each entry, for example a vector will have a floatSize = 3.
Parameters

floatSize (int) – The number of float values that the datatype contains.

Returns

True if this interface can be processed for SDS interpolations.

Return type

bool

CustomDataTagClassInterface.Read(data, hf, level)

Reads a single data entry from a file.

Parameters
  • data (Any) – The data pointer.

  • hf (c4d.HyperFile) – The file handle to read.

  • level (int) – The disk level.

CustomDataTagClassInterface.Write(data, hf)
Parameters
  • data (Any) – The data pointer.

  • hf (c4d.HyperFile) – The file handle to write on.