Class IParamMap2

3DS Max Plug-In SDK

Class IParamMap2

See Also: Class IParamBlock2, Class ParamBlockDesc2, Class ParamMap2UserDlgProc.

class IParamMap2 : public InterfaceServer

Description:

This class is available in release 3.0 and later only.

This class provides methods to work with parameter map2s. Methods are provided for things like invalidating the parameter map so it gets redrawn, working with the parameter blocks associated with the parameter map, and establishing an optional dialog proc to handle controls not directly handled by the parameter map. This section also documents several functions that are available for creating and destroying parameter maps but are not part of this class.

Note: The use of this class requires the explicit inclusion the IPARAMM2.H header file.

Methods:

Prototype:

virtual void Invalidate()=0;

Remarks:

This method marks the user interface as needing to be updated. This affects the entire UI for the parameter map.

Prototype:

virtual void Validate()=0;

Remarks:

This methods un-invalidates the entire user interface.

Prototype:

virtual void Invalidate(ParamID id, int tabIndex=0)=0;

Remarks:

This methods marks a specific control in the UI as requiring an update.

Parameters:

ParamID id

The permanent ID of the control requiring an update.

int tabIndex=0

If the control is a Tab<> then this is the zero based index into the table of the value to be invalidated.

Prototype:

virtual Interval& Validity()=0;

Remarks:

This method is available in release 4.0 and later only.

Provides access to pmap's validity interval. Returns a refernce to the actual interval so it can be modified if desired.

Prototype:

virtual void UpdateUI(TimeValue t)=0;

Remarks:

This method will update the user interface if the current settings are not valid at the given time (i.e., if anything is animated at that time).

Parameters:

TimeValue t

The time to check for the update.

Prototype:

virtual void RedrawViews(TimeValue t, DWORD flag=REDRAW_NORMAL)=0;

Remarks:

This method may be called to cause the viewports to be redrawn.

Parameters:

TimeValue t

The time at which to redraw the viewports.

DWORD flag=REDRAW_NORMAL

You may specify one of the following:

REDRAW_BEGIN

Call this before you redraw.

REDRAW_INTERACTIVE

This allows the view quality to degrade to maintain interactively.

REDRAW_END

If during interactive redraw the state degraded, this will redraw the views in the undegraded state.

REDRAW_NORMAL

This redraws the views in the undegraded state.

Prototype:

virtual void SetParamBlock(IParamBlock2 *pb)=0;

Remarks:

This method swaps the existing parameter block with a new one and updates user interface.

Parameters:

IParamBlock2 *pb

Points to the new parameter block2 to use.

Prototype:

virtual void SetUserDlgProc(ParamMap2UserDlgProc *proc=NULL)=0;

Remarks:

This method allows a developer to provide special handling for one or more controls. The developer provides a dialog proc to process the message from the control. This method is used to tell the parameter map that the developer defined method should be called. The given proc will be called after default processing is done. Note that if the proc is non-NULL when the ParamMap2 is deleted its DeleteThis() method will be called.

Parameters:

ParamMap2UserDlgProc *proc=NULL

Points to the user dialog proc object to process the controls.

Prototype:

virtual ParamMap2UserDlgProc *GetUserDlgProc()=0;

Remarks:

Returns a pointer to the user dialog proc for the parameter map (or NULL if none is defined). See SetUserDlgProc() above.

Prototype:

virtual void ReplaceParam(ParamID curParam, ParamID newParam);

Remarks:

This method changes a parameter map entry to refer to a different item in the parameter block.

Parameters:

ParamID curParam

The parameter ID of the item to change.

ParamID newParam

The new parameter ID.

Prototype:

virtual HWND GetHWnd()=0;

Remarks:

Returns the dialog window handle of the parameter map.

Function:

virtual MapID GetMapID()=0;

Remarks:

This method is available in release 4.0 and later only.

Returns the parameter map’s ID.

Prototype:

virtual IParamBlock2 *GetParamBlock()=0;

Remarks:

Returns a pointer to the parameter block2 used by this parameter map.

Prototype:

virtual BOOL DlgActive()=0;

Remarks:

Returns TRUE if the parameter map dialog proc is active; otherwise FALSE.

Prototype:

virtual ParamBlockDesc2* GetDesc()=0;

Remarks:

Returns a pointer to the ParamBlockDesc2 instance for this parameter map.

Prototype:

virtual void ActivateDlg(BOOL onOff)=0;

Remarks:

This method is called to indicate the dialog is going inactive or is becoming active.

Parameters:

BOOL onOff

TRUE if becoming active; FALSE for inactive.

Prototype:

virtual int FindSubTexFromHWND(HWND hw)=0;

Remarks:

This method is sent to a Material Editor map to find the SubTex index corresponding to the control handle. It should return the index of the sub-texmap corresponding to the window whose handle is passed. If the handle is not valid return -1.

Parameters:

HWND hw

The window handle of the control.

Prototype:

virtual void Enable(ParamID id, BOOL onOff, int tabIndex=0)=0;

Remarks:

This method is used to enable of disable an individual user interface control.

Parameters:

ParamID id

The parameter ID of the control to enable/disable.

BOOL onOff

TRUE to enable; FALSE to disable.

int tabIndex=0

If the control is a Tab<> then this is the zero based index in the table of the item to enable/disable.

Prototype:

virtual void SetText(ParamID id, TCHAR* txt, int tabIndex=0)=0;

Remarks:

This method sets the text of a parameter user interface control.

Parameters:

ParamID id

The ID of the parameter whose user interface text to change.

TCHAR* txt

The new string to display.

int tabIndex=0

If the parmeter is a Tab<> this is the zero based index of the parameter in the table.

Prototype:

virtual void SetTooltip(ParamID id, BOOL onOf, TCHAR* txt, int tabIndex=0)=0;

Remarks:

This methods sets the tooltip text of specified parameter and can turn the tooltip on or off.

Parameters:

ParamID id

The ID of the parameter.

BOOL onOf

TRUE for on; FALSE for off.

TCHAR* txt

The tool tip text.

int tabIndex=0

If the parmeter is a Tab<> this is the zero based index of the parameter in the table.

Prototype:

virtual void SetRange(ParamID id, float low, float high, int tabIndex=0)=0;

Remarks:

This method sets the range of parameter for a spinner or slider control.

Parameters:

ParamID id

The ID of the parameter.

float low

The low range for the spinner / slider.

float high

The high range for the spinner / slider.

int tabIndex=0

If the parmeter is a Tab<> this is the zero based index of the parameter in the table.

Prototype:

virtual void Show(ParamID id, BOOL showHide, int tabIndex=0)=0;

Remarks:

This method will show or hide the specified control.

Parameters:

ParamID id

The ID of the parameter.

BOOL showHide

TRUE to show; FALSE to hide.

int tabIndex=0

If the parmeter is a Tab<> this is the zero based index of the parameter in the table.

Prototype:

virtual void SetThing(ReferenceTarget *m)=0;

Remarks:

This method is called by any IAutoXXParamDlg when it receives a SetThing().

Parameters:

ReferenceTarget *m

The item which was set.

The following functions are not part of this class but are available for use.

Function:

BOOL CreateModalParamMap2(IParamBlock2 *pb, TimeValue t, HINSTANCE hInst, TCHAR *dlgTemplate, HWND hParent, ParamMap2UserDlgProc *proc=NULL);

Remarks:

This function creates a parameter map that will handle a parameter block in a modeless dialog where time does not change and the viewports are not redrawn. Note that there is no need to destroy it. It executes the dialog and then destorys itself.

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

Parameters:

IParamBlock2 *pb

Points to the parameter block2.

TimeValue t

The time at which the dialog is launched.

HINSTANCE hInst

The plug-ins instance handle.

TCHAR *dlgTemplate

The dialog template.

HWND hParent

The parent window.

ParamMap2UserDlgProc *proc=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:

Returns TRUE if the user selected OK, FALSE otherwise.

Function:

BOOL CreateModalParamMap2(IParamBlock2 *pb, TimeValue t, HINSTANCE hInst, DLGTEMPLATE *dlgTemplate, HWND hParent, ParamMap2UserDlgProc *proc=NULL);

Remarks:

This function is available in release 4.0 and later only.

This function creates a parameter map that will handle a parameter block in a modeless dialog where time does not change and the viewports are not redrawn. Note that there is no need to destroy it. It executes the dialog and then destorys itself. This function is currently not in use.

Parameters:

IParamBlock2 *pb

Points to the parameter block2.

TimeValue t

The time at which the dialog is launched.

HINSTANCE hInst

The plug-ins instance handle.

DLGTEMPLATE *dlgTemplate

The dialog template.

HWND hParent

The parent window.

ParamMap2UserDlgProc *proc=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:

Returns TRUE if the user selected OK, FALSE otherwise.

Function:

BOOL CreateModalParamMap2(MapID map_id, IParamBlock2 *pb, TimeValue t, HINSTANCE hInst, TCHAR *dlgTemplate, HWND hParent, ParamMap2UserDlgProc *proc=NULL);

Remarks:

This function is available in release 4.0 and later only.

Creates a parameter map that will handle a parameter block in a modeless dialog where time does not change and the viewports are not redrawn. This overload of CreateModalParamMap2() 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:

IParamMap2 *CreateCPParamMap2(IParamBlock2 *pb, Interface *ip, HINSTANCE hInst, TCHAR *dlgTemplate, TCHAR *title, DWORD flags, ParamMap2UserDlgProc* dlgProc=NULL, HWND hOldRollup=NULL, int category = ROLLUP_CAT_STANDARD);

Remarks:

This function creates a parameter map to handle the display of parameters in the command panel. This will add a rollup page to the command panel (or optionally replace an existing one).

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

Parameters:

IParamBlock2 *pb

Points to the parameter block2.

Interface *ip

Pass in the plug-ins interface pointer.

HINSTANCE hInst

The plug-ins instance handle.

TCHAR *dlgTemplate

The dialog template.

TCHAR *title

The title displayed in the rollup page title bar.

DWORD flags

A flag to control the 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

If non-NULL specifies an existing rollup window in the current UI context that should be replaced with the newly created rollup for this map.

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. Allthough 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.

Return Value:

Returns a pointer to the parameter map2.

Function:

IParamMap2 *CreateCPParamMap2(IParamBlock2 *pb, Interface *ip, HINSTANCE hInst, DLGTEMPLATE *dlgTemplate, TCHAR *title, DWORD flags, ParamMap2UserDlgProc* dlgProc=NULL, HWND hOldRollup=NULL, int category = ROLLUP_CAT_STANDARD);

Remarks:

This function is available in release 4.0 and later only.

This function creates a parameter map to handle the display of parameters in the command panel. This will add a rollup page to the command panel (or optionally replace an existing one). This function is currently not used.

Parameters:

IParamBlock2 *pb

Points to the parameter block2.

Interface *ip

Pass in the plug-ins interface pointer.

HINSTANCE hInst

The plug-ins instance handle.

TCHAR *dlgTemplate

The dialog template.

TCHAR *title

The title displayed in the rollup page title bar.

DWORD flags

A flag to control the 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

If non-NULL specifies an existing rollup window in the current UI context that should be replaced with the newly created rollup for this map.

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. Allthough 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.

Return Value:

Returns a pointer to the parameter map2.

Function:

IParamMap2 *CreateCPParamMap2(MapID map_id, IParamBlock2 *pb, Interface *ip, HINSTANCE hInst, TCHAR *dlgTemplate, TCHAR *title, DWORD flags, ParamMap2UserDlgProc* dlgProc=NULL, HWND hOldRollup=NULL);

Remarks:

This function is available in release 4.0 and later only.

Creates a parameter map to handle the display of parameters in the command panel. This overload of CreateCPParamMap2() 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:

void DestroyCPParamMap2(IParamMap2 *m);

Remarks:

This function destroys a parameter map created by CreateCParamMap2(). The rollup page is removed and the parameter map is deleted.

Parameters:

IParamMap2 *m

A pointer to the parameter map2 to delete.

Function:

IParamMap2 *CreateChildCPParamMap2(IParamBlock2 *pb, Interface *ip, HINSTANCE hInst, IParamMap2* parent, TCHAR *dlgTemplate, TCHAR *title, ParamMap2UserDlgProc* dlgProc=NULL);

Remarks:

This function creates a child dialog of the given parent parammap (for tabbed dialogs, etc.). This version takes an extra parent IParamMap2* and creates a child dialog window in the parent parammap's window (rather than a new rollup) that is mapped by the new parammap. Developers need to call this explicitly once the parent parammap has been created as child parammaps are not created automatically by the P_AUTO_UI mechanisms.

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

Parameters:

IParamBlock2 *pb

Points to the parameter block2.

Interface *ip

Pass in the plug-ins rendering parameters interface pointer.

HINSTANCE hInst

The plug-ins instance handle.

IParamMap2* parent

The parent parameter map.

TCHAR *dlgTemplate

The dialog template.

TCHAR *title

The title displayed.

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:

Returns a pointer to the parameter map2.

Function:

IParamMap2 *CreateChildCPParamMap2(IParamBlock2 *pb, Interface *ip, HINSTANCE hInst, IParamMap2* parent, DLGTEMPLATE *dlgTemplate, TCHAR *title, ParamMap2UserDlgProc* dlgProc=NULL);

Remarks:

This functionis available in release 4.0 and later only.

This function creates a child dialog of the given parent parammap (for tabbed dialogs, etc.). This version takes an extra parent IParamMap2* and creates a child dialog window in the parent parammap's window (rather than a new rollup) that is mapped by the new parammap. Developers need to call this explicitly once the parent parammap has been created as child parammaps are not created automatically by the P_AUTO_UI mechanisms. This function is currently not used.

Parameters:

IParamBlock2 *pb

Points to the parameter block2.

Interface *ip

Pass in the plug-ins rendering parameters interface pointer.

HINSTANCE hInst

The plug-ins instance handle.

IParamMap2* parent

The parent parameter map.

TCHAR *dlgTemplate

The dialog template.

TCHAR *title

The title displayed.

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:

Returns a pointer to the parameter map2.

Function:

IParamMap2 *CreateChildCPParamMap2(MapID map_id, IParamBlock2 *pb, Interface *ip, HINSTANCE hInst, IParamMap2* parent, TCHAR *dlgTemplate, TCHAR *title, ParamMap2UserDlgProc* dlgProc=NULL);

Remarks:

This function is available in release 4.0 and later only.

Create a child dialog of the given parent command panel parammap (for tabbed dialogs, etc.) This overload of CreateChildCPParamMap2() 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:

void DestroyChildCPParamMap2(IParamMap2 *m);

Remarks:

This function destroys a parameter map created by CreateChildCPParamMap2().

Parameters:

IParamMap2 *m

Points to the parameter map2 to destroy.

Function:

IParamMap2 *CreateRParamMap2(IParamBlock2 *pb, IRendParams *ip, HINSTANCE hInst, TCHAR *dlgTemplate, TCHAR *title, DWORD flags, ParamMap2UserDlgProc* dlgProc=NULL, int category = ROLLUP_CAT_STANDARD);

Remarks:

Creates a parameter map to handle the display of render parameters or atmospheric plug-in parameters.

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

Parameters:

IParamBlock2 *pb

Points to the parameter block2.

IRendParams *ip

Pass in the plug-ins rendering parameters interface pointer. See Class IRendParams.

HINSTANCE hInst

The plug-ins instance handle.

TCHAR *dlgTemplate

The dialog template.

TCHAR *title

The title displayed in the rollup page title bar.

DWORD flags

A flag to control the 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.

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. Allthough 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.

Return Value:

Returns a pointer to the parameter map2.

Function:

IParamMap2 *CreateRParamMap2(IParamBlock2 *pb, IRendParams *ip, HINSTANCE hInst, DLGTEMPLATE *dlgTemplate, TCHAR *title, DWORD flags, ParamMap2UserDlgProc* dlgProc=NULL, int category = ROLLUP_CAT_STANDARD);

Remarks:

Creates a parameter map to handle the display of render parameters or atmospheric plug-in parameters.

Parameters:

IParamBlock2 *pb

Points to the parameter block2.

IRendParams *ip

Pass in the plug-ins rendering parameters interface pointer. See Class IRendParams.

HINSTANCE hInst

The plug-ins instance handle.

DLGTEMPLATE *dlgTemplate

The dialog template.

TCHAR *title

The title displayed in the rollup page title bar.

DWORD flags

A flag to control the 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.

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. Allthough 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.

Return Value:

Returns a pointer to the parameter map2.

Function:

IParamMap2 *CreateRParamMap2(MapID map_id, IParamBlock2 *pb, IRendParams *ip, HINSTANCE hInst, TCHAR *dlgTemplate, TCHAR *title, DWORD flags, ParamMap2UserDlgProc* dlgProc=NULL);

Remarks:

This function is available in release 4.0 and later only.

Creates a parameter map to handle the display of render parameters or atmospheric plug-in parameters. This overload of CreateRParamMap2() 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:

void DestroyRParamMap2(IParamMap2 *m);

Remarks:

This function is available in release 3.0 and later only.

This function destroys a parameter map created by CreateRParamMap2(). The rollup page is removed and the parameter map is deleted.

Parameters:

IParamMap2 *m

Points to the parameter map2 to destroy.

Function:

IParamMap2* CreateChildRParamMap2(IParamBlock2 *pb, IRendParams *ip, HINSTANCE hInst, IParamMap2* parent, TCHAR *dlgTemplate, TCHAR *title, ParamMap2UserDlgProc* dlgProc=NULL);

Remarks:

This function create a parameter map for render or atmospheric parameters in a child dialog window of the given parent parammap, used typically to create tab child windows in a tabbed rollout. This version takes an extra parent IParamMap2* and creates a child dialog window in the parent parammap's window (rather than a new rollup) that is mapped by the new parammap. Developers need to call this explicitly once the parent parammap has been created as child parammaps are not created automatically by the P_AUTO_UI mechanisms.

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

Parameters:

IParamBlock2 *pb

Points to the parameter block2.

IRendParams *ip

Pass in the plug-ins material parameters interface pointer. See Class IRendParams.

HINSTANCE hInst

The plug-ins instance handle.

IParamMap2* parent

The parent parameter map.

TCHAR *dlgTemplate

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

TCHAR *title

The title displayed in the dialog.

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:

Returns a pointer to the parameter map2 created.

Function:

IParamMap2* CreateChildRParamMap2(IParamBlock2 *pb, IRendParams *ip, HINSTANCE hInst, IParamMap2* parent, DLGTEMPLATE *dlgTemplate, TCHAR *title, ParamMap2UserDlgProc* dlgProc=NULL);

Remarks:

This function is available in release 4.0 and later only.

This function create a parameter map for render or atmospheric parameters in a child dialog window of the given parent parammap, used typically to create tab child windows in a tabbed rollout. This version takes an extra parent IParamMap2* and creates a child dialog window in the parent parammap's window (rather than a new rollup) that is mapped by the new parammap. Developers need to call this explicitly once the parent parammap has been created as child parammaps are not created automatically by the P_AUTO_UI mechanisms. This function is currently not being used.

Parameters:

IParamBlock2 *pb

Points to the parameter block2.

IRendParams *ip

Pass in the plug-ins material parameters interface pointer. See Class IRendParams.

HINSTANCE hInst

The plug-ins instance handle.

IParamMap2* parent

The parent parameter map.

DLGTEMPLATE *dlgTemplate

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

TCHAR *title

The title displayed in the dialog.

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:

Returns a pointer to the parameter map2 created.

Function:

IParamMap2* CreateChildRParamMap2(MapID map_id, IParamBlock2 *pb, IRendParams *ip, HINSTANCE hInst, IParamMap2* parent, TCHAR *dlgTemplate, TCHAR *title, ParamMap2UserDlgProc* dlgProc=NULL);

Remarks:

This function is available in release 4.0 and later only.

Creates a parameter map for render or atmospheric parameters in a child dialog window of the given parent parammap. This overload of CreateChildRParamMap2() 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:

void DestroyChildRParamMap2(IParamMap2 *m);

Remarks:

This function destroys a parameter map created by CreateChildRParamMap2().

Parameters:

IParamMap2 *m

Points to the parameter map2 to destroy.

Function:

IParamMap2 *CreateMParamMap2(IParamBlock2 *pb, IMtlParams *ip, HINSTANCE hInst, HWND hmedit, TexDADMgr* dad, MtlDADMgr* mdad, TCHAR *dlgTemplate, TCHAR *title, DWORD flags, ParamMap2UserDlgProc* dlgProc=NULL, HWND hOldRollup=NULL, int category = ROLLUP_CAT_STANDARD);

Remarks:

Creates a parameter map to handle the display of texture map or material parameters in the material editor.

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

Parameters:

IParamBlock2 *pb

Points to the parameter block2.

IMtlParams *ip

Pass in the plug-ins material parameters interface pointer. See Class IMtlParams_.

HINSTANCE hInst

The plug-ins instance handle.

HWND hmedit

The window handle to the materials editor.

TexDADMgr* dad

Points to the manager used to handle drag and drop of textures. See Class TexDADMgr.

MtlDADMgr* mdad

Points to the manager used to handle drag and drop of materials. See Class MtlDADMgr.

TCHAR *dlgTemplate

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

TCHAR *title

The title displayed in the rollup page title bar.

DWORD flags

A flag to control the 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

If non-NULL specifies an existing rollup window in the current UI context that should be replaced with the newly created rollup for this map.

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. Allthough 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.

Return Value:

Returns a pointer to the parameter map2 created.

Function:

IParamMap2 *CreateMParamMap2(IParamBlock2 *pb, IMtlParams *ip, HINSTANCE hInst, HWND hmedit, TexDADMgr* dad, MtlDADMgr* mdad, DLGTEMPLATE *dlgTemplate, TCHAR *title, DWORD flags, ParamMap2UserDlgProc* dlgProc=NULL, HWND hOldRollup=NULL, int category = ROLLUP_CAT_STANDARD);

Remarks:

This function is available in release 4.0 and later only.

Creates a parameter map to handle the display of texture map or material parameters in the material editor. This function is currently not in use.

Parameters:

IParamBlock2 *pb

Points to the parameter block2.

IMtlParams *ip

Pass in the plug-ins material parameters interface pointer. See Class IMtlParams_.

HINSTANCE hInst

The plug-ins instance handle.

HWND hmedit

The window handle to the materials editor.

TexDADMgr* dad

Points to the manager used to handle drag and drop of textures. See Class TexDADMgr.

MtlDADMgr* mdad

Points to the manager used to handle drag and drop of materials. See Class MtlDADMgr.

DLGTEMPLATE *dlgTemplate

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

TCHAR *title

The title displayed in the rollup page title bar.

DWORD flags

A flag to control the 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

If non-NULL specifies an existing rollup window in the current UI context that should be replaced with the newly created rollup for this map.

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. Allthough 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.

Return Value:

Returns a pointer to the parameter map2 created.

Function:

IParamMap2 *CreateMParamMap2(MapID map_id, IParamBlock2 *pb, IMtlParams *ip, HINSTANCE hInst, HWND hmedit, TexDADMgr* dad, MtlDADMgr* mdad, TCHAR *dlgTemplate, TCHAR *title, DWORD flags, ParamMap2UserDlgProc* dlgProc=NULL, HWND hOldRollup=NULL);

Remarks:

This function is available in release 4.0 and later only.

Creates a parameter map to handle the display of texture map or material parameters in the material editor. This overload of CreateMParamMap2() 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:

void DestroyMParamMap2(IParamMap2 *m);

Remarks:

This function destroys a parameter map created by CreateMParamMap2(). The rollup page is removed and the parameter map is deleted.

Parameters:

IParamMap2 *m

Points to the parameter map2 to destroy.

Function:

IParamMap2 *CreateChildMParamMap2(IParamBlock2 *pb, IMtlParams *ip, HINSTANCE hInst, IParamMap2* parent, TexDADMgr* tdad, MtlDADMgr* mdad, TCHAR *dlgTemplate, TCHAR *title, ParamMap2UserDlgProc* dlgProc=NULL);

Remarks:

This function creates and returns a child dialog of the given parent parammap (for tabbed dialogs, etc.). This version takes an extra parent IParamMap2* and create a child dialog window in the parent parammap's window (rather than a new rollup) that is mapped by the new parammap. Developers need to call this explicitly once the parent parammap has been created as child parammaps are not created automatically by the P_AUTO_UI mechanisms.

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

Parameters:

IParamBlock2 *pb

Points to the parameter block2.

IMtlParams *ip

Pass in the plug-ins material parameters interface pointer. See Class IMtlParams_.

HINSTANCE hInst

The plug-ins instance handle.

IParamMap2* parent

The parent parameter map.

TexDADMgr* tdad

Points to the manager used to handle drag and drop of textures. See Class TexDADMgr.

MtlDADMgr* mdad

Points to the manager used to handle drag and drop of materials. See Class MtlDADMgr_.

TCHAR *dlgTemplate

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

TCHAR *title

The title displayed in the dialog.

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:

Returns a pointer to the parameter map2 created.

Function:

IParamMap2 *CreateChildMParamMap2(IParamBlock2 *pb, IMtlParams *ip, HINSTANCE hInst, IParamMap2* parent, TexDADMgr* tdad, MtlDADMgr* mdad, TCHAR *dlgTemplate, TCHAR *title, ParamMap2UserDlgProc* dlgProc=NULL);

Remarks:

This function is available in release 4.0 and later only.

This function creates and returns a child dialog of the given parent parammap (for tabbed dialogs, etc.). This version takes an extra parent IParamMap2* and create a child dialog window in the parent parammap's window (rather than a new rollup) that is mapped by the new parammap. Developers need to call this explicitly once the parent parammap has been created as child parammaps are not created automatically by the P_AUTO_UI mechanisms. This function is currently not being used.

Parameters:

IParamBlock2 *pb

Points to the parameter block2.

IMtlParams *ip

Pass in the plug-ins material parameters interface pointer. See Class IMtlParams_.

HINSTANCE hInst

The plug-ins instance handle.

IParamMap2* parent

The parent parameter map.

TexDADMgr* tdad

Points to the manager used to handle drag and drop of textures. See Class TexDADMgr.

MtlDADMgr* mdad

Points to the manager used to handle drag and drop of materials. See Class MtlDADMgr_.

DLGTEMPLATE *dlgTemplate

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

TCHAR *title

The title displayed in the dialog.

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:

Returns a pointer to the parameter map2 created.

Function:

IParamMap2 *CreateChildMParamMap2(IParamBlock2 *pb, IMtlParams *ip, HINSTANCE hInst, IParamMap2* parent, TexDADMgr* tdad, MtlDADMgr* mdad, TCHAR *dlgTemplate, TCHAR *title, ParamMap2UserDlgProc* dlgProc=NULL);

Remarks:

This function is available in release 4.0 and later only.

Creates and returns a child dialog of the given material or texture map parent parammap (for tabbed dialogs, etc.) This overload of CreateChildMParamMap2() 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:

void DestroyChildMParamMap2(IParamMap2 *m);

Remarks:

This function destroys a parameter map created by CreateChildMParamMap2().

Parameters:

IParamMap2 *m

Points to the parameter map2 to destroy.

Function:

BOOL CreateChildModalParamMap2(MapID map_id, IParamBlock2 *pb, HINSTANCE hInst, IParamMap2 *parent, TCHAR *dlgTemplate, TCHAR *title, ParamMap2UserDlgProc *proc=NULL);

Remarks:

This function is available in release 4.0 and later only.

This function creates a child dialog of the given modal parent parammap (for tabbed dialogs, etc.). Unlike modal parent parammap, you do need to destroy it. This version takes an extra parent IParamMap2* and creates a child dialog window in the parent parammap's window (rather than a new rollup) that is mapped by the new parammap. Developers need to call this explicitly once the parent parammap has been created as child parammaps are not created automatically by the P_AUTO_UI mechanisms.

Parameters:

MapID map_id

Specifies the ID of the parameter map/rollup to be created for this particular parameter block.

IParamBlock2 *pb

Points to the parameter block2.

HINSTANCE hInst

The plug-ins instance handle.

IParamMap2* parent

The parent parameter map.

TCHAR *dlgTemplate

The dialog template.

TCHAR *title

The title displayed in the dialog.

ParamMap2UserDlgProc *proc=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:

Returns TRUE if the user selected OK, FALSE otherwise.

Function:

BOOL CreateChildModalParamMap2(IParamBlock2 *pb, HINSTANCE hInst, IParamMap2 *parent, TCHAR *dlgTemplate, TCHAR *title, ParamMap2UserDlgProc *proc=NULL);

Remarks:

This function is available in release 4.0 and later only.

This is an overload that simply calls the explicit map ID version of CreateChildMParamMap2() with default map ID of 0. See that version for description.

Function:

void DestroyChildModalParamMap2(IParamMap2 *m);

Remarks:

This function destroys a parameter map created by CreateChildModalParamMap2().

Parameters:

IParamMap2 *m

Points to the parameter map2 to destroy.