3ds Max C++ API Reference
IRendParams Class Referenceabstract

This is the interface given to a renderer, or atmospheric effect when it needs to display its parameters. More...

#include <IRendParams.h>

+ Inheritance diagram for IRendParams:

Public Member Functions

virtual TimeValue GetTime ()=0
 Returns the current position of the frame slider. More...
 
virtual void RegisterTimeChangeCallback (TimeChangeCallback *tc)=0
 Register a callback object that will get called every time the current animation time is changed. More...
 
virtual void UnRegisterTimeChangeCallback (TimeChangeCallback *tc)=0
 Un-registers a callback object registered using RegisterTimeChangeCallback(). More...
 
virtual MtlBaseDoMaterialBrowseDlg (HWND hParent, DWORD flags, BOOL &newMat, BOOL &cancel)=0
 Brings up the material browse dialog allowing the user to select a material. More...
 
virtual HWND AddRollupPage (HINSTANCE hInst, const MCHAR *dlgTemplate, DLGPROC dlgProc, const MCHAR *title, LPARAM param=0, DWORD flags=0, int category=ROLLUP_CAT_STANDARD)=0
 This method adds rollup pages to the dialog and returns the window handle of the page. More...
 
virtual HWND AddRollupPage (HINSTANCE hInst, DLGTEMPLATE *dlgTemplate, DLGPROC dlgProc, const MCHAR *title, LPARAM param=0, DWORD flags=0, int category=ROLLUP_CAT_STANDARD)=0
 
virtual void AddRollupPage (QWidget &qtWidget, const MCHAR *title, DWORD rollupFlags=0, int category=ROLLUP_CAT_STANDARD)=0
 Adds a rollup page that hosts a Qt dialog. More...
 
virtual void DeleteRollupPage (HWND hRollup)=0
 Removes a rollup page and destroys it. More...
 
virtual void DeleteRollupPage (QWidget &qtWidget)=0
 Removes a rollup page that hosts a Qt dialog. More...
 
virtual void RollupMouseMessage (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)=0
 This allows hand cursor scrolling when the user clicks the mouse in an unused area of the dialog. More...
 
virtual void SetPickMode (RendPickProc *proc)=0
 This will set the command mode to a standard pick mode. More...
 
virtual void EndPickMode ()=0
 If a plug-in is finished editing its parameters it should not leave the user in a pick mode. More...
 
virtual void PutMtlToMtlEditor (MtlBase *mb)=0
 When a plugin has a Texmap, clicking on the button associated with that map should cause this routine to be called. More...
 
virtual float GetMaxPixelSize ()=0
 This method is used internally. More...
 
virtual INT_PTR Execute (int, ULONG_PTR=0, ULONG_PTR=0, ULONG_PTR=0)
 
virtual IRollupWindowGetIRollup ()=0
 
virtual HWND AddTabRollupPage (const Class_ID &, HINSTANCE hInst, const MCHAR *dlgTemplate, DLGPROC dlgProc, const MCHAR *title, LPARAM param=0, DWORD flags=0, int category=ROLLUP_CAT_STANDARD)
 
virtual HWND AddTabRollupPage (const Class_ID &, HINSTANCE hInst, DLGTEMPLATE *dlgTemplate, DLGPROC dlgProc, const MCHAR *title, LPARAM param=0, DWORD flags=0, int category=ROLLUP_CAT_STANDARD)
 
virtual void DeleteTabRollupPage (const Class_ID &, HWND hRollup)
 
virtual void RollupTabMouseMessage (const Class_ID &, HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
virtual IRollupWindowGetTabIRollup (const Class_ID &)
 
virtual ITabbedDialogGetTabDialog ()
 
virtual ITabPageGetTabPage (const Class_ID &)
 
- 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

This is the interface given to a renderer, or atmospheric effect when it needs to display its parameters.

For a renderer, the Render Scene dialog may be extended using this class. All methods of this class are implemented by the system.

See also
Class TimeChangeCallback, Class RendPickProc.

Member Function Documentation

◆ GetTime()

virtual TimeValue GetTime ( )
pure virtual

Returns the current position of the frame slider.

◆ RegisterTimeChangeCallback()

virtual void RegisterTimeChangeCallback ( TimeChangeCallback tc)
pure virtual

Register a callback object that will get called every time the current animation time is changed.

Parameters:
TimeChangeCallback *tc

The callback object to register.

◆ UnRegisterTimeChangeCallback()

virtual void UnRegisterTimeChangeCallback ( TimeChangeCallback tc)
pure virtual

Un-registers a callback object registered using RegisterTimeChangeCallback().

Parameters:
TimeChangeCallback *tc

The callback object to un-register.

◆ DoMaterialBrowseDlg()

virtual MtlBase* DoMaterialBrowseDlg ( HWND  hParent,
DWORD  flags,
BOOL &  newMat,
BOOL &  cancel 
)
pure virtual

Brings up the material browse dialog allowing the user to select a material.

Parameters:
HWND hParent

The parent window handle.

DWORD flags

See Material Browser Flags .

BOOL &newMat

Set to TRUE if the material is new OR cloned; otherwise FALSE.

BOOL &cancel

Set to TRUE if the user cancels the dialog; otherwise FALSE.
Returns
The material returned will be NULL if the user selects 'None'

◆ AddRollupPage() [1/3]

virtual HWND AddRollupPage ( HINSTANCE  hInst,
const MCHAR dlgTemplate,
DLGPROC  dlgProc,
const MCHAR title,
LPARAM  param = 0,
DWORD  flags = 0,
int  category = ROLLUP_CAT_STANDARD 
)
pure virtual

This method adds rollup pages to the dialog and returns the window handle of the 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

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. 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.
Returns
The window handle of the rollup page.

◆ AddRollupPage() [2/3]

virtual HWND AddRollupPage ( HINSTANCE  hInst,
DLGTEMPLATE *  dlgTemplate,
DLGPROC  dlgProc,
const MCHAR title,
LPARAM  param = 0,
DWORD  flags = 0,
int  category = ROLLUP_CAT_STANDARD 
)
pure virtual
Remarks
This method adds rollup pages to the dialog and returns the window handle of the page. This method is currently not being 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

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. 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.
Returns
The window handle of the rollup page.

◆ AddRollupPage() [3/3]

virtual void AddRollupPage ( QWidget &  qtWidget,
const MCHAR title,
DWORD  rollupFlags = 0,
int  category = ROLLUP_CAT_STANDARD 
)
pure virtual

Adds a rollup page that hosts a Qt dialog.

Parameters
qtWidgetthe Qt widget that will be hosted in the rollup. This QWidget becomes the ownership of the system; it will be deleted by the system once no longer needed.
titleThe title string, displayed at the top of the rollup.l
rollupFlagsOptional rollup flags, such as APPENDROLL_CLOSED, DONTAUTOCLOSE, ROLLUP_SAVECAT, etc.
categoryThe category controls the ordering of the rollups, with lower values being inserted before rollups of higher category.
See also
void DeleteRollupPage(QWidget& qtWidget)

◆ DeleteRollupPage() [1/2]

virtual void DeleteRollupPage ( HWND  hRollup)
pure virtual

Removes a rollup page and destroys it.

Parameters:
HWND hRollup

The handle of the rollup window. This is the handle returned from AddRollupPage().

◆ DeleteRollupPage() [2/2]

virtual void DeleteRollupPage ( QWidget &  qtWidget)
pure virtual

Removes a rollup page that hosts a Qt dialog.

Remarks
The QWidget will get destroyed as a result of calling this.
See also
void AddRollupPage(QWidget& qtWidget, const MCHAR *title, DWORD rollupFlags, int category)

◆ RollupMouseMessage()

virtual void RollupMouseMessage ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
pure virtual

This 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 dialog, the plug-in should pass mouse messages to this function which will pass them on to the rollup.

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.

◆ SetPickMode()

virtual void SetPickMode ( RendPickProc proc)
pure virtual

This will set the command mode to a standard pick mode.

The callback implements hit testing and a method that is called when the user actually picks an item.

Parameters:
RendPickProc *proc

The callback object. See Class RendPickProc.

◆ EndPickMode()

virtual void EndPickMode ( )
pure virtual

If a plug-in is finished editing its parameters it should not leave the user in a pick mode.

This method will flush out any pick modes in the command stack.

◆ PutMtlToMtlEditor()

virtual void PutMtlToMtlEditor ( MtlBase mb)
pure virtual

When a plugin has a Texmap, clicking on the button associated with that map should cause this routine to be called.

Parameters:
MtlBase *mb

The MtlBase (Texmap or Mtl) to put to the materials editor.

◆ GetMaxPixelSize()

virtual float GetMaxPixelSize ( )
pure virtual

This method is used internally.

◆ Execute()

virtual INT_PTR Execute ( int  ,
ULONG_PTR  = 0,
ULONG_PTR  = 0,
ULONG_PTR  = 0 
)
inlinevirtual
Remarks
This is a general purpose function that allows the API to be extended in the future. The 3ds Max development team can assign new cmd numbers and continue to add functionality to this class without having to 'break' the API.
Parameters:
int cmd

The index of the command to execute.

ULONG_PTR arg1=0

Optional argument 1. See the documentation where the cmd option is discussed for more details on these parameters.

ULONG_PTR arg2=0

Optional argument 2.

ULONG_PTR arg3=0

Optional argument 3.
Returns
An integer return value. See the documentation where the cmd option is discussed for more details on the meaning of this value.
238 { return 0; }

◆ GetIRollup()

virtual IRollupWindow* GetIRollup ( )
pure virtual

◆ AddTabRollupPage() [1/2]

virtual HWND AddTabRollupPage ( const Class_ID ,
HINSTANCE  hInst,
const MCHAR dlgTemplate,
DLGPROC  dlgProc,
const MCHAR title,
LPARAM  param = 0,
DWORD  flags = 0,
int  category = ROLLUP_CAT_STANDARD 
)
inlinevirtual
247  {
248  return AddRollupPage(hInst, dlgTemplate, dlgProc, title, param, flags, category);
249  }
virtual HWND AddRollupPage(HINSTANCE hInst, const MCHAR *dlgTemplate, DLGPROC dlgProc, const MCHAR *title, LPARAM param=0, DWORD flags=0, int category=ROLLUP_CAT_STANDARD)=0
This method adds rollup pages to the dialog and returns the window handle of the page.

◆ AddTabRollupPage() [2/2]

virtual HWND AddTabRollupPage ( const Class_ID ,
HINSTANCE  hInst,
DLGTEMPLATE *  dlgTemplate,
DLGPROC  dlgProc,
const MCHAR title,
LPARAM  param = 0,
DWORD  flags = 0,
int  category = ROLLUP_CAT_STANDARD 
)
inlinevirtual
253  {
254  return AddRollupPage(hInst, dlgTemplate, dlgProc, title, param, flags, category);
255  }

◆ DeleteTabRollupPage()

virtual void DeleteTabRollupPage ( const Class_ID ,
HWND  hRollup 
)
inlinevirtual
259  {
260  DeleteRollupPage(hRollup);
261  }
virtual void DeleteRollupPage(HWND hRollup)=0
Removes a rollup page and destroys it.

◆ RollupTabMouseMessage()

virtual void RollupTabMouseMessage ( const Class_ID ,
HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
inlinevirtual
266  {
267  RollupMouseMessage(hDlg, message, wParam, lParam);
268  }
virtual void RollupMouseMessage(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)=0
This allows hand cursor scrolling when the user clicks the mouse in an unused area of the dialog.

◆ GetTabIRollup()

virtual IRollupWindow* GetTabIRollup ( const Class_ID )
inlinevirtual
272  {
273  return GetIRollup();
274  }
virtual IRollupWindow * GetIRollup()=0

◆ GetTabDialog()

virtual ITabbedDialog* GetTabDialog ( )
inlinevirtual
278  {
279  return NULL;
280  }
#define NULL
Definition: autoptr.h:18

◆ GetTabPage()

virtual ITabPage* GetTabPage ( const Class_ID )
inlinevirtual
284  {
285  return NULL;
286  }