Class MtlBaseList

3DS Max Plug-In SDK

Class MtlBaseList

See Also: Template Class Tab, Class MtlBase, Class Interface.

class MtlBaseList: public Tab<MtlBaseHandle>

Description:

A simple list of MtlBases. All methods of this class are implemented by the system.

Note the following typedefs:

typedef MtlBase* MtlBaseHandle;

typedef Mtl* MtlHandle;

typedef Texmap* TexmapHandle;

Methods:

Prototype:

int AddMtl(MtlBase *m, BOOL checkUnique=TRUE);

Remarks:

Adds the specified MtlBase to the list.

Parameters:

MtlBase *m

The MtlBase to add.

BOOL checkUnique=TRUE

If TRUE this method checks to make sure the MtlBase is unique, and will only add it if so.

Return Value:

Nonzero if the MtlBase was added; otherwise zero.

Prototype:

int FindMtl(MtlBase *m);

Remarks:

Finds the specified MtlBase in this material list and returns its index. Returns -1 if not found.

Parameters:

MtlBase *m

The MtlBase to find.

Prototype:

int FindMtlByName(TSTR& name);

Remarks:

Finds the specified material by name and returns its index. Returns -1 if not found.

Parameters:

TSTR& name

The name to find.

Prototype:

void RemoveEntry(int n);

Remarks:

Removes the specified MtlBase from the list.

Parameters:

int n

The index of the MtlBase to remove.

Prototype:

void Empty();

Remarks:

Removes all MtlBases from the list.