3ds Max C++ API Reference
|
An interface to manage the renderer messages (error, warning, progress, etc.). More...
#include <IRenderMessageManager.h>
Public Types | |
enum | MessageSource { kSource_ProductionRenderer = 0 , kSource_MEditRenderer , kSource_ActiveShadeRenderer , kSource_Count } |
Different sources for renderer message. More... | |
enum | MessageType { kType_Fatal = 0x0001 , kType_Error = 0x0002 , kType_Warning = 0x0004 , kType_Info = 0x0008 , kType_Progress = 0x0010 , kType_Debug = 0x0020 , kType_System = 0x0040 } |
Type of a message. More... | |
using | rmmPreferencesCallback = void(*)(void *param) |
Callback function for client to process the "preference option changed" notification. | |
Public Member Functions | |
virtual | ~IRenderMessageManager () |
virtual bool | OpenMessageWindow ()=0 |
Open the message window. | |
virtual void | ClearDisplayedMessages ()=0 |
Clear all the displayed messages on the message window. | |
virtual void | CloseMessageWindow ()=0 |
Destroy the message window. | |
virtual void | HideMessageWindow ()=0 |
Make the message window invisible. | |
virtual bool | LogMessage (MessageSource msgSource, MessageType msgType, DWORD systemLogType, const MCHAR *msgBody)=0 |
Log a message to the manager. | |
virtual void | FlushPendingMessages (MessageSource source)=0 |
Flush pending messages from a certain source. | |
virtual void | ClearDisplayedMessages (MessageSource source)=0 |
Clear displayed messages from a certain source. | |
virtual bool | OpenLogFile (MessageSource source)=0 |
Open the log file for message logging if possible. | |
virtual void | FlushLogFile (MessageSource source)=0 |
Flush buffer to the log file for specific message source. | |
virtual void | CloseLogFile (MessageSource source)=0 |
Close log file for specific message source. | |
virtual void | RegisterChangeCallback (rmmPreferencesCallback callback, void *param)=0 |
Register a client defined callback to get notification whenever a preference option is changed via UI operation, API call, and MAXScript. | |
virtual void | UnRegisterChangeCallback (rmmPreferencesCallback callback, void *param)=0 |
Unregister preference change callbacks. | |
virtual bool | GetOpenMessageWindowOnError () const =0 |
Get the "Open Message Window on Error" option. | |
virtual void | SetOpenMessageWindowOnError (bool flag)=0 |
Set the "Open Message Window on Error" option. | |
virtual bool | GetShowInformationMessages () const =0 |
Get the "Show/Log Information Messages" option. | |
virtual void | SetShowInformationMessages (bool flag)=0 |
Set the "Show/Log Information Messages" option. | |
virtual bool | GetShowProgressMessages () const =0 |
Get the "Show/Log Progress Messages" option. | |
virtual void | SetShowProgressMessages (bool flag)=0 |
Set the "Show/Log Progress Messages" option. | |
virtual bool | GetLogDebugMessages () const =0 |
Get the "Log Debug Messages (To File)" option. | |
virtual void | SetLogDebugMessages (bool flag)=0 |
Set the "Log Debug Messages (To File)" option. | |
virtual const MCHAR * | GetLogFileNameTemplate ()=0 |
Get the message log file name template. | |
virtual void | SetLogFileNameTemplate (const MCHAR *fileName)=0 |
Set the message log file name template. | |
virtual const MCHAR * | GetLogFileName (MessageSource source)=0 |
Get the actual message log file name for a specific message source. | |
virtual bool | GetLogFileON () const =0 |
Get the "Write Messages to File" option. | |
virtual void | SetLogFileON (bool flag)=0 |
Set the "Write Messages to File" option. | |
virtual bool | GetLogFileAppend () const =0 |
Get the "Append to File" option. | |
virtual void | SetLogFileAppend (bool flag)=0 |
Set the "Append to File" option. | |
virtual bool | GetOpenMessageWindowOnWarning () const =0 |
Get the "Open Message Window on Warning" option. | |
virtual void | SetOpenMessageWindowOnWarning (bool flag)=0 |
Set the "Open Message Window on Warning" option. | |
virtual bool | GetMessageWindowAutoScroll () const =0 |
Get the "Auto Scroll" option. | |
virtual void | SetMessageWindowAutoScroll (bool flag)=0 |
Sets the "Auto Scroll" option. | |
Additional Inherited Members | |
Static Public Member Functions inherited from MaxHeapOperators | |
static UtilExport void * | operator new (size_t size) |
Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator new[] (size_t size) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate arrays of objects. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
static UtilExport void * | operator new (size_t size, void *placement_ptr) |
Placement new operator. | |
static UtilExport void | operator delete (void *ptr, void *placement_ptr) |
Placement delete operator. | |
static UtilExport void * | aligned_malloc (size_t size, size_t alignment) |
Allocates memory on a specified alignment boundary. | |
static UtilExport void * | aligned_realloc (void *ptr, size_t size, size_t alignment) |
Reallocates memory on a specified alignment boundary. | |
static UtilExport void | aligned_free (void *ptr) |
Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. | |
An interface to manage the renderer messages (error, warning, progress, etc.).
Clients log messages to this manager, and the manager will automatically dispatch the messages
to the message window, or to Max log system (if Max is running in quiet mode or network rendering is taking place).
using rmmPreferencesCallback = void(*)(void* param) |
Callback function for client to process the "preference option changed" notification.
param | A pointer to client data. This will be exactly the same pointer provided by client on calling RegisterChangeCallback, as parameter "param". Client is responsible for interpreting the pointer to a specific type. |
enum MessageSource |
Different sources for renderer message.
Enumerator | |
---|---|
kSource_ProductionRenderer | Production Renderer. |
kSource_MEditRenderer | |
kSource_ActiveShadeRenderer | Active Shade Renderer. |
kSource_Count |
enum MessageType |
Type of a message.
Enumerator | |
---|---|
kType_Fatal | System/module crash, etc. Fatal messages are always shown on the message window. |
kType_Error | Coverable errors. Error messages are always shown on the message window. |
kType_Warning | Minor issues. Warning messages are always shown on the message window. |
kType_Info | Brief information messages for monitoring, debugging purposes and so on. Client can choose to show/hide information messages on the message window. |
kType_Progress | Messages to provide progress information for a time-consuming job. Client can choose to show/hide progress messages on the message window. |
kType_Debug | Detailed information messages solely for debugging purpose. These messages are never shown on the message window. Client can choose to log debug messages to the log file (if present).
|
kType_System | Messages from the system. Client does not use this flag. |
|
inlinevirtual |
|
pure virtual |
Open the message window.
|
pure virtual |
Clear all the displayed messages on the message window.
|
pure virtual |
Destroy the message window.
|
pure virtual |
Make the message window invisible.
|
pure virtual |
Log a message to the manager.
msgSource | Source of the message; determines which tab, in the render message dialog, the message is reports in. |
msgType | Type of the message for purposes of reporting to the user. Affects how the message is reported to the render message window. |
systemLogType | Type of the message for purposes of processing by the system. See systemErrorLogMessageTypes in log.h. |
msgBody | Text of the message. |
|
pure virtual |
Flush pending messages from a certain source.
source | Source of the message. |
|
pure virtual |
Clear displayed messages from a certain source.
source | Source of the messages that client wants to clear. |
|
pure virtual |
Open the log file for message logging if possible.
Typically this is called from a renderer's Open() implementation.
|
pure virtual |
Flush buffer to the log file for specific message source.
|
pure virtual |
Close log file for specific message source.
Typically this is called from a renderer's Close() implementation.
|
pure virtual |
Register a client defined callback to get notification whenever a preference option is changed via UI operation, API call, and MAXScript.
callback | The callback function client wants to register. |
param | A pointer to client data. This pointer will be used as the only parameter of the callback function. |
|
pure virtual |
Unregister preference change callbacks.
callback | The callback function client wants to unregister. |
param | A pointer to client data. Make sure it matches the one passed along with RegisterChangeCallback(). |
|
pure virtual |
Get the "Open Message Window on Error" option.
|
pure virtual |
Set the "Open Message Window on Error" option.
flag | Set true if client wants the manager to open the window whenever there's a fatal/error message sent in, false otherwise. |
|
pure virtual |
Get the "Show/Log Information Messages" option.
|
pure virtual |
|
pure virtual |
Get the "Show/Log Progress Messages" option.
|
pure virtual |
|
pure virtual |
Get the "Log Debug Messages (To File)" option.
|
pure virtual |
Set the "Log Debug Messages (To File)" option.
flag | Set true if client wants the manager to log debug messages to the log file, false otherwise. |
|
pure virtual |
Get the message log file name template.
Set the message log file name template.
fileName | The log file name template to set. |
|
pure virtual |
Get the actual message log file name for a specific message source.
source | Source of the messages that the log file is related to. |
|
pure virtual |
Get the "Write Messages to File" option.
|
pure virtual |
|
pure virtual |
Get the "Append to File" option.
|
pure virtual |
|
pure virtual |
Get the "Open Message Window on Warning" option.
|
pure virtual |
|
pure virtual |
Get the "Auto Scroll" option.