Class IDXShaderManagerInterface
See Also: Class IViewportShaderManager
class IDXShaderManagerInterface : public FPStaticInterface
Description:
This class is only available in release 5 or later.
The class provides access to the Viewport Manager feature in release 5. The viewport manager controls the loading of Viewport Shaders in 3ds max and is displayed on each material. The class provides methods to query the manager to find out whether it is visible or active, and also to retrieve the active shader.
The viewport manager ONLY works in DirectX mode. It can however be visible in Heidi and OpenGL, so as to provide the artist feedback when loading someone else’s file.
There is a global method you can call to get access to the DX manager.
IDXShaderManagerInterface* GetDXShaderManager()
Methods:
Prototype:
virtual CustAttrib* FindViewportShaderManager (MtlBase* mtl)=0
Remarks:
This method will check the Material passed into find out whether it contains the ViewportManager Custom Attribute. If it does it will return its pointer, otherwise it will be NULL. This pointer can safely be cast to IViewportShaderManager.
Parameters:
MtlBase* mtl
The material to search for the Viewport Manager.
Prototype:
virtual CustAttrib* AddViewportShaderManager(MtlBase* mtl)=0
Remarks:
This method will add the ViewportManager custom atrribute to the material supplied. If successful it will return the newly created custom attribute. This pointer can safely be cast to IViewportShaderManager.
Parameters:
MtlBase* mtl
The material to add the Viewport Manager to
Prototype:
virtual void SetVisible(BOOL show=TRUE)=0
Remarks:
This method allows the system to either show or hide the ViewportManager. This will physically remove it from the Material Editor, whoever the manager will still exist on the material
Parameters:
BOOL show
The value to set the visible state of the manager.
Prototype:
virtual BOOL IsVisible ()=0
Remarks:
This method will return the actual visible state of the manager