ISubMtlAPI Class Reference
 
 
 
ISubMtlAPI Class Reference

#include <sbmtlapi.h>

Inheritance diagram for ISubMtlAPI:
MaxHeapOperators PatchObject SplineShape

Class Description

See also:
Working with Materials.
Description:
This class is used if you wish to support the direct assignment of sub materials to selected faces. For a reference implementation of this class, please refer to the code in /MAXSDK/SAMPLES/MESH/EDITABLEMESH/TRIOBJED.CPP.

Public Member Functions

virtual MtlID  GetNextAvailMtlID (ModContext *mc)=0
virtual BOOL  HasFaceSelection (ModContext *mc)=0
virtual void  SetSelFaceMtlID (ModContext *mc, MtlID id, BOOL bResetUnsel=FALSE)=0
virtual int  GetSelFaceUniqueMtlID (ModContext *mc)=0
virtual int  GetSelFaceAnyMtlID (ModContext *mc)=0
virtual int  GetMaxMtlID (ModContext *mc)=0

Member Function Documentation

virtual MtlID GetNextAvailMtlID ( ModContext mc ) [pure virtual]
Remarks:
This method returns a material ID that is currently not used by the object. If the current face selection share one single MtlDI that is not used by any other faces, you should use it.

Implemented in PatchObject, and SplineShape.

virtual BOOL HasFaceSelection ( ModContext mc ) [pure virtual]
Remarks:
This method indicates if you are active in the modifier panel and have an active face selection. Return TRUE if so, otherwise FALSE.

Implemented in PatchObject, and SplineShape.

virtual void SetSelFaceMtlID ( ModContext mc,
MtlID  id,
BOOL  bResetUnsel = FALSE 
) [pure virtual]
Remarks:
This method sets the selected faces to the specified material ID..
Parameters:
MtlID id

The material id to set for the selected faces.

BOOL bResetUnsel = FALSE

If TRUE, then you should set the remaining unselected face material IDs to 0.

Implemented in PatchObject, and SplineShape.

virtual int GetSelFaceUniqueMtlID ( ModContext mc ) [pure virtual]
Remarks:
This method returns the material ID of the selected face(s). If multiple faces are selected they should all have the same MtlID -- otherwise you should return -1. If faces other than the selected share the same material ID, then return -1.

Implemented in PatchObject, and SplineShape.

virtual int GetSelFaceAnyMtlID ( ModContext mc ) [pure virtual]
Remarks:
This method returns the material ID of the selected face(s). If multiple faces are selected they should all have the same MtlID, otherwise return -1.

Implemented in PatchObject, and SplineShape.

virtual int GetMaxMtlID ( ModContext mc ) [pure virtual]
Remarks:
This method returns the highest MtlID on the object.

Implemented in PatchObject, and SplineShape.