Public Types | Public Member Functions

IMtlEditInterface Class Reference

Search for all occurrences

Detailed Description

See also:
Class MtlBase, Class FPStaticInterface

Description:
This class is available in release 4.0 and later only.

This class represents the interface to the Material Editor. You can obtain a pointer to the Material Editor interface using; IMtlEditInterface* GetMtlEditInterface (). This macro will return

(IMtlEditInterface *)GetCOREInterface(MTLEDIT_INTERFACE).

All methods of this class are Implemented by the System.

#include <imtledit.h>

Inheritance diagram for IMtlEditInterface:
Inheritance graph
[legend]

List of all members.

Public Types

enum   {
  fnIdGetCurMtl, fnIdSetActiveMtlSlot, fnIdGetActiveMtlSlot, fnIdPutMtlToMtlEditor,
  fnIdGetTopMtlSlot, fnIdOkMtlForScene, fnIdUpdateMtlEditorBrackets
}

Public Member Functions

virtual MtlBase GetCurMtl ()=0
virtual void  SetActiveMtlSlot (int i, BOOL forceUpdate=FALSE)=0
virtual int  GetActiveMtlSlot ()=0
virtual void  PutMtlToMtlEditor (MtlBase *mtlBase, int slot)=0
virtual MtlBase GetTopMtlSlot (int slot)=0
virtual BOOL  OkMtlForScene (MtlBase *m)=0
virtual void  UpdateMtlEditorBrackets ()=0

Member Enumeration Documentation

anonymous enum

Member Function Documentation

virtual MtlBase* GetCurMtl ( ) [pure virtual]
Remarks:
This method returns a material base pointer for the current material.
virtual void SetActiveMtlSlot ( int  i,
BOOL  forceUpdate = FALSE 
) [pure virtual]
Remarks:
This method allows you to set the active material slot.
Parameters:
int i

The material slot index.

BOOL forceUpdate = FALSE

Set this to TRUE to update the slot contents.
virtual int GetActiveMtlSlot ( ) [pure virtual]
Remarks:
This method returns the index of the active material slot.
virtual void PutMtlToMtlEditor ( MtlBase mtlBase,
int  slot 
) [pure virtual]
Remarks:
This method allows you to put the specified material to the specified material editor slot.
Parameters:
MtlBase *mtlBase

The material you want to put.

int slot

The index of the material slot you wish to put the material into.
virtual MtlBase* GetTopMtlSlot ( int  slot ) [pure virtual]
Remarks:
This method returns a pointer to the material base from the specified slot.
Parameters:
int slot

The index of the material slot for which you wish to obtain the material.
virtual BOOL OkMtlForScene ( MtlBase m ) [pure virtual]
Remarks:
Before assigning material to scene, call this to avoid duplicate names.
Parameters:
MtlBase *m

The pointer to the material.
virtual void UpdateMtlEditorBrackets ( ) [pure virtual]
Remarks:
This method makes sure the Materials Editor slots correctly reflect which materials are used in the scene, which are used by selected objects, etc. This is used internally for the drag-and-drop of materials to nodes -- there is no reason why a plug-in developer should need to call it.

IMtlEditInterface IMtlEditInterface IMtlEditInterface IMtlEditInterface IMtlEditInterface IMtlEditInterface IMtlEditInterface IMtlEditInterface IMtlEditInterface IMtlEditInterface
IMtlEditInterface IMtlEditInterface IMtlEditInterface IMtlEditInterface IMtlEditInterface IMtlEditInterface IMtlEditInterface IMtlEditInterface IMtlEditInterface IMtlEditInterface