Public Member Functions

IMtlParams Class Reference

Search for all occurrences

Detailed Description

See also:
Class Mtl, Working with Materials, Class IRollupWindow.

Description:
This is the interface that is passed in to the material or texture map when it is in the material editor. All methods of this class are implemented by the system.

#include <imtl.h>

Inheritance diagram for IMtlParams:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void  MtlChanged ()=0
virtual HWND  AddRollupPage (HINSTANCE hInst, MCHAR *dlgTemplate, DLGPROC dlgProc, MCHAR *title, LPARAM param=0, DWORD flags=0, int category=ROLLUP_CAT_STANDARD)=0
virtual HWND  AddRollupPage (HINSTANCE hInst, DLGTEMPLATE *dlgTemplate, DLGPROC dlgProc, MCHAR *title, LPARAM param=0, DWORD flags=0, int category=ROLLUP_CAT_STANDARD)=0
virtual HWND  ReplaceRollupPage (HWND hOldRollup, HINSTANCE hInst, MCHAR *dlgTemplate, DLGPROC dlgProc, MCHAR *title, LPARAM param=0, DWORD flags=0, int category=ROLLUP_CAT_STANDARD)=0
virtual HWND  ReplaceRollupPage (HWND hOldRollup, HINSTANCE hInst, DLGTEMPLATE *dlgTemplate, DLGPROC dlgProc, MCHAR *title, LPARAM param=0, DWORD flags=0, int category=ROLLUP_CAT_STANDARD)=0
virtual void  DeleteRollupPage (HWND hRollup)=0
virtual void  RollupMouseMessage (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)=0
virtual int  IsRollupPanelOpen (HWND hwnd)=0
virtual int  GetRollupScrollPos ()=0
virtual void  SetRollupScrollPos (int spos)=0
virtual void  RegisterTimeChangeCallback (TimeChangeCallback *tc)=0
virtual void  UnRegisterTimeChangeCallback (TimeChangeCallback *tc)=0
virtual void  RegisterDlgWnd (HWND hDlg)=0
virtual int  UnRegisterDlgWnd (HWND hDlg)=0
virtual TimeValue  GetTime ()=0
virtual void  SetPickMode (PickObjectProc *proc)=0
virtual void  EndPickMode ()=0
virtual IRollupWindow GetMtlEditorRollup ()=0
virtual INT_PTR  Execute (int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0)

Member Function Documentation

virtual void MtlChanged ( ) [pure virtual]
Remarks:
This method may be called to causes the viewports to be redrawn. It should be called when any parameter that affects the look of the material in the viewport has been altered. If the material is not on a visible node in a shaded view, nothing will happen. This method should NOT be called as a spinner is being dragged, but only upon release of the mouse button.
virtual HWND AddRollupPage ( HINSTANCE  hInst,
MCHAR *  dlgTemplate,
DLGPROC  dlgProc,
MCHAR *  title,
LPARAM  param = 0,
DWORD  flags = 0,
int  category = ROLLUP_CAT_STANDARD 
) [pure virtual]
Remarks:
This method may be called to add a rollup page to the material editor dialog. It returns the window handle of the dialog that makes up the rollup page.
Parameters:
HINSTANCE hInst

The DLL instance handle of the plug-in.

MCHAR *dlgTemplate

The dialog template for the rollup page.

DLGPROC dlgProc

The dialog proc to handle the message sent to the rollup page.

MCHAR *title

The title displayed in the title bar.

LPARAM param=0

Any specific data to pass along may be stored here. This may be later retrieved using the GetWindowLong() call from the Windows API.

DWORD flags=0

The following flag is defined:

APPENDROLL_CLOSED

Starts the page in the rolled up state.

int category = ROLLUP_CAT_STANDARD

The category parameter provides flexibility with regard to where a particular rollup should be displayed in the UI. RollupPanels with lower category fields will be displayed before RollupPanels with higher category fields. For RollupPanels with equal category value the one that was added first will be displayed first. Although it is possible to pass any int value as category there exist currently 5 different category defines: ROLLUP_CAT_SYSTEM, ROLLUP_CAT_STANDARD, and ROLLUP_CAT_CUSTATTRIB.

When using ROLLUP_SAVECAT, the rollup page will make the provided category sticky, meaning it will not read the category from the RollupOrder.cfg file, but rather save the category field that was passed as argument in the CatRegistry and in the RollupOrder.cfg file.

The method will take the category of the replaced rollup in case the flags argument contains ROLLUP_USEREPLACEDCAT. This is mainly done, so that this system works with param maps as well.
Returns:
The window handle of the rollup page.
virtual HWND AddRollupPage ( HINSTANCE  hInst,
DLGTEMPLATE *  dlgTemplate,
DLGPROC  dlgProc,
MCHAR *  title,
LPARAM  param = 0,
DWORD  flags = 0,
int  category = ROLLUP_CAT_STANDARD 
) [pure virtual]
Remarks:
This method may be called to add a rollup page to the material editor dialog. It returns the window handle of the dialog that makes up the rollup page. This method is currently not used.
Parameters:
HINSTANCE hInst

The DLL instance handle of the plug-in.

DLGTEMPLATE *dlgTemplate

The dialog template for the rollup page.

DLGPROC dlgProc

The dialog proc to handle the message sent to the rollup page.

MCHAR *title

The title displayed in the title bar.

LPARAM param=0

Any specific data to pass along may be stored here. This may be later retrieved using the GetWindowLong() call from the Windows API.

DWORD flags=0

The following flag is defined:

APPENDROLL_CLOSED

Starts the page in the rolled up state.

int category = ROLLUP_CAT_STANDARD

The category parameter provides flexibility with regard to where a particular rollup should be displayed in the UI. RollupPanels with lower category fields will be displayed before RollupPanels with higher category fields. For RollupPanels with equal category value the one that was added first will be displayed first. Although it is possible to pass any int value as category there exist currently 5 different category defines: ROLLUP_CAT_SYSTEM, ROLLUP_CAT_STANDARD, and ROLLUP_CAT_CUSTATTRIB.

When using ROLLUP_SAVECAT, the rollup page will make the provided category sticky, meaning it will not read the category from the RollupOrder.cfg file, but rather save the category field that was passed as argument in the CatRegistry and in the RollupOrder.cfg file.

The method will take the category of the replaced rollup in case the flags argument contains ROLLUP_USEREPLACEDCAT. This is mainly done, so that this system works with param maps as well.
Returns:
The window handle of the rollup page.
virtual HWND ReplaceRollupPage ( HWND  hOldRollup,
HINSTANCE  hInst,
MCHAR *  dlgTemplate,
DLGPROC  dlgProc,
MCHAR *  title,
LPARAM  param = 0,
DWORD  flags = 0,
int  category = ROLLUP_CAT_STANDARD 
) [pure virtual]
Remarks:
This method is used to replace the rollup page whose index is passed.
Parameters:
HWND hOldRollup

The handle to the rollup to replace.

HINSTANCE hInst

The DLL instance handle of the plug-in.

MCHAR *dlgTemplate

The dialog template for the rollup page.

DLGPROC dlgProc

The dialog proc to handle the message sent to the rollup page.

MCHAR *title

The title displayed in the title bar.

LPARAM param=0

Any specific data to pass along may be stored here.

DWORD flags=0

Append rollup page flags:

APPENDROLL_CLOSED

Starts the page in the rolled up state.

int category = ROLLUP_CAT_STANDARD

The category parameter provides flexibility with regard to where a particular rollup should be displayed in the UI. RollupPanels with lower category fields will be displayed before RollupPanels with higher category fields. For RollupPanels with equal category value the one that was added first will be displayed first. Although it is possible to pass any int value as category there exist currently 5 different category defines: ROLLUP_CAT_SYSTEM, ROLLUP_CAT_STANDARD, and ROLLUP_CAT_CUSTATTRIB.

When using ROLLUP_SAVECAT, the rollup page will make the provided category sticky, meaning it will not read the category from the RollupOrder.cfg file, but rather save the category field that was passed as argument in the CatRegistry and in the RollupOrder.cfg file.

The method will take the category of the replaced rollup in case the flags argument contains ROLLUP_USEREPLACEDCAT. This is mainly done, so that this system works with param maps as well.
Returns:
The handle of the replacement page is returned.
virtual HWND ReplaceRollupPage ( HWND  hOldRollup,
HINSTANCE  hInst,
DLGTEMPLATE *  dlgTemplate,
DLGPROC  dlgProc,
MCHAR *  title,
LPARAM  param = 0,
DWORD  flags = 0,
int  category = ROLLUP_CAT_STANDARD 
) [pure virtual]
Remarks:
This method is used to replace the rollup page whose index is passed. This method is currently not being used.
Parameters:
HWND hOldRollup

The handle to the rollup to replace.

HINSTANCE hInst

The DLL instance handle of the plug-in.

DLGTEMPLATE *dlgTemplate

The dialog template for the rollup page.

DLGPROC dlgProc

The dialog proc to handle the message sent to the rollup page.

MCHAR *title

The title displayed in the title bar.

LPARAM param=0

Any specific data to pass along may be stored here.

DWORD flags=0

Append rollup page flags:

APPENDROLL_CLOSED

Starts the page in the rolled up state.

int category = ROLLUP_CAT_STANDARD

The category parameter provides flexibility with regard to where a particular rollup should be displayed in the UI. RollupPanels with lower category fields will be displayed before RollupPanels with higher category fields. For RollupPanels with equal category value the one that was added first will be displayed first. Although it is possible to pass any int value as category there exist currently 5 different category defines: ROLLUP_CAT_SYSTEM, ROLLUP_CAT_STANDARD, and ROLLUP_CAT_CUSTATTRIB.

When using ROLLUP_SAVECAT, the rollup page will make the provided category sticky, meaning it will not read the category from the RollupOrder.cfg file, but rather save the category field that was passed as argument in the CatRegistry and in the RollupOrder.cfg file.

The method will take the category of the replaced rollup in case the flags argument contains ROLLUP_USEREPLACEDCAT. This is mainly done, so that this system works with param maps as well.
Returns:
The handle of the replacement page is returned.
virtual void DeleteRollupPage ( HWND  hRollup ) [pure virtual]
Remarks:
This method may be called to remove a rollup page and destroy it.
Parameters:
HWND hRollup

The handle of the rollup window. This is the handle returned from AddRollupPage().
virtual void RollupMouseMessage ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
) [pure virtual]
Remarks:
This method allows hand cursor scrolling when the user clicks the mouse in an unused area of the dialog. When the user mouses down in dead area of the material editor, the plug-in should pass mouse messages to this function.

Note: In 3ds Max 2.0 and later only use of this method is no longer required -- the functionality happens automatically.
Parameters:
HWND hDlg

The window handle of the dialog.

UINT message

The message sent to the dialog proc.

WPARAM wParam

Passed in to the dialog proc. Pass along to this method.

LPARAM lParam

Passed in to the dialog proc. Pass along to this method.
Example:
case WM_LBUTTONDOWN: case WM_LBUTTONUP: case WM_MOUSEMOVE:

im->iMtlParams->RollupMouseMessage(hDlg,message,wParam,lParam);
virtual int IsRollupPanelOpen ( HWND  hwnd ) [pure virtual]
Remarks:
Returns nonzero if the rollup page whose handle is passed is open; otherwise zero.
Parameters:
HWND hwnd

The window handle of the rollup page to check.
virtual int GetRollupScrollPos ( ) [pure virtual]
Remarks:
Returns the rollup scroll position. This is used, for example, by the Standard material because it saves and restores the rollup page positions with the material. This is just a convenience for the user.
virtual void SetRollupScrollPos ( int  spos ) [pure virtual]
Remarks:
This method may be called to set the rollup scroll position. If the position was previously saved, this method may be called to restore it. The Standard material uses this method because it saves and restores the rollup positions with the material as a convenience for the user.
Parameters:
int spos

Specifies the rollup scroll position.
virtual void RegisterTimeChangeCallback ( TimeChangeCallback tc ) [pure virtual]
Remarks:
Registers a callback object that will get called every time the current animation time is changed.
Parameters:
TimeChangeCallback *tc

The callback called when the time changes. See Class TimeChangeCallback.
virtual void UnRegisterTimeChangeCallback ( TimeChangeCallback tc ) [pure virtual]
Remarks:
This method un-registers the time change callback.
Parameters:
TimeChangeCallback *tc

The callback called when the time changes. See Class TimeChangeCallback.
virtual void RegisterDlgWnd ( HWND  hDlg ) [pure virtual]
Remarks:
This is called automatically in AddRollupPage(), so a plug-in doesn't need to do it. It is now obsolete.
Parameters:
HWND hDlg

The handle of the dialog window.
virtual int UnRegisterDlgWnd ( HWND  hDlg ) [pure virtual]
Remarks:
This method is called automatically and is now obsolete.
Parameters:
HWND hDlg

The handle of the dialog window.
virtual TimeValue GetTime ( ) [pure virtual]
Remarks:
Returns the current time (the frame slider position).
Returns:
The current time.

Pick an object from the scene
virtual void SetPickMode ( PickObjectProc proc ) [pure virtual]
Remarks:
Calling this methods puts the user into a pick mode where they can select items in the scene.
Parameters:
PickObjectProc *proc

This is the callback object for the picking. Its methods allow for filtering the picks, changing cursors over valid hits, and allowing multiple picks. See Class PickObjectProc.
virtual void EndPickMode ( ) [pure virtual]
Remarks:
This method is called to terminate the pick mode.
virtual IRollupWindow* GetMtlEditorRollup ( ) [pure virtual]
Remarks:
This method returns an interface to Materials Editor rollup.
virtual INT_PTR Execute ( int  cmd,
ULONG_PTR  arg1 = 0,
ULONG_PTR  arg2 = 0,
ULONG_PTR  arg3 = 0 
) [inline, virtual]

IMtlParams IMtlParams IMtlParams IMtlParams IMtlParams IMtlParams IMtlParams IMtlParams IMtlParams IMtlParams
IMtlParams IMtlParams IMtlParams IMtlParams IMtlParams IMtlParams IMtlParams IMtlParams IMtlParams IMtlParams