3ds Max C++ API Reference
ShaderParamDlg Class Referenceabstract

A shader parameter dialog class. More...

#include <shaders.h>

+ Inheritance diagram for ShaderParamDlg:

Public Member Functions

virtual Class_ID ClassID ()=0
 Returns the unique Class_ID of this object. More...
 
virtual void SetThing (ReferenceTarget *m)=0
 Sets the current shader (the one being edited) to the shader passed as a ReferenceTarget. More...
 
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. More...
 
virtual ReferenceTargetGetThing ()=0
 Returns the a pointer to the current material being edited. More...
 
virtual ShaderGetShader ()=0
 Returns a pointer to the current Shader. More...
 
virtual void SetTime (TimeValue t)
 Called when the current time has changed. More...
 
virtual void DeleteThis ()=0
 Called to delete this instance of the class. More...
 
virtual INT_PTR PanelProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)=0
 The dialog procedure for the user interface controls of the Shader. More...
 
virtual void LoadDialog (int draw)=0
 Loads the user interface controls with their current values. More...
 
virtual void UpdateDialog (ParamID paramId)=0
 
virtual HWND GetHWnd ()=0
 Returns the window handle of the rollup panel. More...
 
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. More...
 
virtual void UpdateOpacity ()=0
 Updates the opacity parameter of the plug-in in the user interface. More...
 
virtual void UpdateMapButtons ()=0
 Updates the map buttons in the user interface. More...
 
- Public Member Functions inherited from ParamDlg
virtual void ReloadDialog ()=0
 
virtual void ActivateDlg (BOOL onOff)=0
 
virtual int FindSubMtlFromHWND (HWND hwnd)
 
virtual INT_PTR Execute (int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

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

Member Function Documentation

◆ ClassID()

virtual Class_ID ClassID ( )
pure virtual

Returns the unique Class_ID of this object.

Implements ParamDlg.

◆ SetThing()

virtual void SetThing ( ReferenceTarget m)
pure virtual

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

Parameters
mThe pointer to the Shader to be set as the current shader.

Implements ParamDlg.

◆ SetThings()

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
pMtlThe pointer to the standard material to be set as the current standard material.
pShaderThe pointer to the shader to be set as the current shader.

◆ GetThing()

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.

◆ GetShader()

virtual Shader* GetShader ( )
pure virtual

Returns a pointer to the current Shader.

◆ SetTime()

virtual void SetTime ( TimeValue  t)
inlinevirtual

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
tThe new current time.

Implements ParamDlg.

58 { UNUSED_PARAM(t); }
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18

◆ DeleteThis()

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.

◆ PanelProc()

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
hwndDlgThe window handle of the rollup page.
msgThe message to process.
wParamThe first dialog parameter.
lParamThe 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.

◆ LoadDialog()

virtual void LoadDialog ( int  draw)
pure virtual

Loads the user interface controls with their current values.

Parameters
drawNot currently used.

◆ UpdateDialog()

virtual void UpdateDialog ( ParamID  paramId)
pure virtual

◆ GetHWnd()

virtual HWND GetHWnd ( )
pure virtual

Returns the window handle of the rollup panel.

◆ FindSubTexFromHWND()

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

◆ UpdateOpacity()

virtual void UpdateOpacity ( )
pure virtual

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

◆ UpdateMapButtons()

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.