Class IAutoMParamDlg

3DS Max Plug-In SDK

Class IAutoMParamDlg

See Also: Class ParamDlg, Class IParamMap2, Class IMtlParams, Class ParamMap2UserDlgProc.

class IAutoMParamDlg : public ParamDlg

Description:

This class is available in release 3.0 and later only.

This is the Auto ParamDlg class for Material Editor auto-UI, instanced by ClassDesc2::CreateParamDlg(). It maintains a table of secondary ParamDlgs for master ParamDlgs (eg, the one returned from CreateParamDlg()) and will broadcast appropriate method calls to them as the master receives them.

Methods:

public:

Prototype:

virtual void InvalidateUI()=0;

Remarks:

This method causes the user interface controls to be re-drawn.

Prototype:

virtual void MtlChanged()=0;

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.

Prototype:

virtual int NumDlgs()=0;

Remarks:

Returns the number of secondary dialogs.

Prototype:

virtual void AddDlg(ParamDlg* dlg)=0;

Remarks:

Adds the specified dialog as another secondary dialog.

Parameters:

ParamDlg* dlg

Points to the parameter dialog to add.

Prototype:

virtual ParamDlg* GetDlg(int i)=0;

Remarks:

Returns a pointer to the 'i-th' secondary dialog.

Parameters:

int i

The zero based index of the dialog to return.

Prototype:

virtual void SetDlg(int i, ParamDlg* dlg)=0;

Remarks:

Sets the 'i-th' dialog to the one passed.

Parameters:

int i

The zero based index of the dialog to set.

ParamDlg* dlg

Points to the parameter dialog to set.

Prototype:

virtual void DeleteDlg(ParamDlg* dlg)=0;

Remarks:

This method is used for deleting secondary dialogs from a master IAutoMParamDlg. Use this along with AddDlg() if you are dynamically changing the set of rollups for the plugin, so that the P_AUTO_UI system can correctly manage all current secondary rollups.

Parameters:

ParamDlg* dlg

Points to the ParamDlg to delete.

Prototype:

virtual IParamMap2* GetMap()=0;

Remarks:

Returns a pointer to the parameter map2 of this primary (master) dialog.

This function is not part of this class but is available for use.

Function:

IAutoMParamDlg* CreateAutoMParamDlg(HWND hMedit, IMtlParams *i, MtlBase* mtl, IParamBlock2* pb, ClassDesc2* cd, HINSTANCE inst, TCHAR* dlgTemplate, TCHAR* title, int rollFlags, ParamMap2UserDlgProc* dlgProc=NULL);

Remarks:

This function may be called to create a parameter map2 for use in the material editor dialog.

Note, in version 4.0 and later, this actually maps to a call on the explicit map ID overload of CreateAutoMParamDlg() with default map ID of 0.

Parameters:

HWND hMedit

The window handle of the materials editor.

IMtlParams *i

The interface pointer for materials. See Class IMtlParams.

MtlBase* mtl

Points to the material calling this function.

IParamBlock2* pb

Points to the parameter block instance associated with the parameter map.

ClassDesc2* cd

The class descriptor2 for the plug-in creating the parameter map.

HINSTANCE inst

The plug-ins DLL instance handle.

TCHAR* dlgTemplate

Dialog template for the rollup page (created using the resource editor)

TCHAR* title

The title displayed in the rollup page title bar.

int rollFlags

A set of flags to control settings of the rollup page.

APPENDROLL_CLOSED

Starts the page in the rolled up state.

ParamMap2UserDlgProc* dlgProc=NULL

If there is some custom handling required by a particular control, the client can derive a class from ParamMap2UserDlgProc and set it as the parameter map's user callback.

HWND hOldRollup=NULL

An optional window handle to allow supplying an existing rollup that will be replaced by the newly cerated one.

Return Value:

A pointer to an interface for managing the parameter map2.

Function:

IAutoMParamDlg* CreateAutoMParamDlg(MapID map_id, HWND hMedit, IMtlParams *i, MtlBase* mtl, IParamBlock2* pb, ClassDesc2* cd, HINSTANCE inst, TCHAR* dlgTemplate, TCHAR* title, int rollFlags, ParamMap2UserDlgProc* dlgProc=NULL);

Remarks:

This function is available in release 4.0 and later only.

This function may be called to create a parameter map2 for use in the material editor dialog. This overload of CreateAutoMParamDlg() has a new parameter, map_id, that specifies the ID of the parameter map/rollup to be created for this particular parameter block. See original function for the rest of the description.

Function:

IAutoEParamDlg* CreateAutoEParamDlg(IRendParams *i, Effect* e, IParamBlock2* pb, ClassDesc2* cd, HINSTANCE inst, TCHAR* dlgTemplate, TCHAR* title, int rollFlags, ParamMap2UserDlgProc* dlgProc=NULL);

Remarks:

This function creates an AutoEParamDlg for render effects.

Note, in version 4.0 and later, this actually maps to a call on the explicit map ID overload of CreateAutoEParamDlg() with default map ID of 0.

Parameters:

IRendParams *i

An interface pointer for rendering effects.

Effect* e

Points to the rendering effect calling this function.

IParamBlock2* pb

Points to the parameter block instance associated with the parameter map.

ClassDesc2* cd

The class descriptor2 for the plug-in creating the parameter map.

HINSTANCE inst

The plug-ins DLL instance handle.

TCHAR* dlgTemplate

Dialog template for the rollup page (created using the resource editor)

TCHAR* title

The title displayed in the rollup page title bar.

int rollFlags

A set of flags to control settings of the rollup page.

APPENDROLL_CLOSED

Starts the page in the rolled up state.

ParamMap2UserDlgProc* dlgProc=NULL

If there is some custom handling required by a particular control, the client can derive a class from ParamMap2UserDlgProc and set it as the parameter map's user callback.

Return Value:

A pointer to an interface for managing the parameter map2.

Function:

IAutoEParamDlg* CreateAutoEParamDlg(MapID map_id, IRendParams *i, Effect* e, IParamBlock2* pb, ClassDesc2* cd, HINSTANCE inst, TCHAR* dlgTemplate, TCHAR* title, int rollFlags, ParamMap2UserDlgProc* dlgProc=NULL);

Remarks:

This function is available in release 4.0 and later only.

This function creates an AutoEParamDlg for render effects. This overload of CreateAutoEParamDlg() has a new parameter, map_id, that specifies the ID of the parameter map/rollup to be created for this particular parameter block. See original function for the rest of the description.