Public Member Functions

ShaderParamDlg Class Reference

Search for all occurrences

Detailed Description

A shader parameter dialog class.

An instance of ShaderParamDlg is returned by a shader when it is asked by 3ds Max to display its rollup page.

See also:
ParamDlg, StdMat2, Shader

#include <shaders.h>

Inheritance diagram for ShaderParamDlg:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual Class_ID  ClassID ()=0
  Returns the unique Class_ID of this object.
virtual void  SetThing (ReferenceTarget *m)=0
  Sets the current shader (the one being edited) to the shader passed as a ReferenceTarget.
virtual void  SetThings (StdMat2 *pMtl, Shader *pShader)=0
  Sets the current Standard material and its shader (which are being edited) to those which are passed as inputs.
virtual ReferenceTarget GetThing ()=0
  Returns the a pointer to the current material being edited.
virtual Shader GetShader ()=0
  Returns a pointer to the current Shader.
virtual void  SetTime (TimeValue t)
  Called when the current time has changed.
virtual void  DeleteThis ()=0
  Called to delete this instance of the class.
virtual INT_PTR  PanelProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)=0
  The dialog procedure for the user interface controls of the Shader.
virtual void  LoadDialog (int draw)=0
  Loads the user interface controls with their current values.
virtual void  UpdateDialog (ParamID paramId)=0
virtual HWND  GetHWnd ()=0
  Returns the window handle of the rollup panel.
virtual int  FindSubTexFromHWND (HWND hw)=0
  Returns the index of the sub-texture map corresponding to the window whose handle is passed as the input.
virtual void  UpdateOpacity ()=0
  Updates the opacity parameter of the plug-in in the user interface.
virtual void  UpdateMapButtons ()=0
  Updates the map buttons in the user interface.

Member Function Documentation

virtual Class_ID ClassID ( ) [pure virtual]

Returns the unique Class_ID of this object.

Implements ParamDlg.

virtual void SetThing ( ReferenceTarget m ) [pure virtual]

Sets the current shader (the one being edited) to the shader passed as a ReferenceTarget.

Parameters:
m The pointer to the Shader to be set as the current shader.

Implements ParamDlg.

virtual void SetThings ( StdMat2 pMtl,
Shader pShader 
) [pure virtual]

Sets the current Standard material and its shader (which are being edited) to those which are passed as inputs.

Parameters:
pMtl The pointer to the standard material to be set as the current standard material.
pShader The pointer to the shader to be set as the current shader.
virtual ReferenceTarget* GetThing ( ) [pure virtual]

Returns the a pointer to the current material being edited.

Note that in most of the GetThing() or SetThing() methods in the SDK, the 'Thing' is referring to the actual plug-in. However, this does not hold true here. This function returns the material using this Shader, not the actual plug-in.

Implements ParamDlg.

virtual Shader* GetShader ( ) [pure virtual]

Returns a pointer to the current Shader.

virtual void SetTime ( TimeValue  t ) [inline, virtual]

Called when the current time has changed.

This gives the developer an opportunity to update any user interface data that may need adjusting due to the change in time.

Parameters:
t The new current time.

Implements ParamDlg.

{ UNUSED_PARAM(t); }    
virtual void DeleteThis ( ) [pure virtual]

Called to delete this instance of the class.

For dynamically created global utility plug-ins, this method has to be implemented and should have a implementation like

         { delete this; }

Implements ParamDlg.

virtual INT_PTR PanelProc ( HWND  hwndDlg,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
) [pure virtual]

The dialog procedure for the user interface controls of the Shader.

Parameters:
hwndDlg The window handle of the rollup page.
msg The message to process.
wParam The first dialog parameter.
lParam The second dialog parameter.
Returns:
In response to a WM_INITDIALOG message: Zero if the dialog box procedure calls the SetFocus() function to set the focus to one of the controls in the dialog, Non-zero Otherwise. If non-zero, the system sets the focus to the first control in the dialog that can be given the focus.
In response to any message other than WM_INITDIALOG: Nonzero if the procedure processes the message, zero otherwise.
virtual void LoadDialog ( int  draw ) [pure virtual]

Loads the user interface controls with their current values.

Parameters:
draw Not currently used.
virtual void UpdateDialog ( ParamID  paramId ) [pure virtual]
virtual HWND GetHWnd ( ) [pure virtual]

Returns the window handle of the rollup panel.

virtual int FindSubTexFromHWND ( HWND  hw ) [pure virtual]

Returns the index of the sub-texture map corresponding to the window whose handle is passed as the input.

Parameters:
hw The window handle to check.
Returns:
The index of the sub-texmap corresponding to the window whose handle is passed as the input. Returns -1 if the handle is not valid.

Reimplemented from ParamDlg.

virtual void UpdateOpacity ( ) [pure virtual]

Updates the opacity parameter of the plug-in in the user interface.

virtual void UpdateMapButtons ( ) [pure virtual]

Updates the map buttons in the user interface.

For example it can put a " " or "m" or "M" on the button face based on the state of the map.


ShaderParamDlg ShaderParamDlg ShaderParamDlg ShaderParamDlg ShaderParamDlg ShaderParamDlg ShaderParamDlg ShaderParamDlg ShaderParamDlg ShaderParamDlg
ShaderParamDlg ShaderParamDlg ShaderParamDlg ShaderParamDlg ShaderParamDlg ShaderParamDlg ShaderParamDlg ShaderParamDlg ShaderParamDlg ShaderParamDlg