Public Member Functions

ISubMtlAPI Class Reference

Search for all occurrences

Detailed Description

See also:
Working with Materials.
Description:
This class is available in release 2.5 and later only.

In 3ds Max 2.5 this is only supported for objects flowing down the geometry pipeline.

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.

#include <sbmtlapi.h>

Inheritance diagram for ISubMtlAPI:
Inheritance graph
[legend]

List of all members.

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.


ISubMtlAPI ISubMtlAPI ISubMtlAPI ISubMtlAPI ISubMtlAPI ISubMtlAPI ISubMtlAPI ISubMtlAPI ISubMtlAPI ISubMtlAPI
ISubMtlAPI ISubMtlAPI ISubMtlAPI ISubMtlAPI ISubMtlAPI ISubMtlAPI ISubMtlAPI ISubMtlAPI ISubMtlAPI ISubMtlAPI