3ds Max C++ API Reference
IRenderingLogger Class Referenceabstract

The Rendering API's interface for logging messages against 3ds Max build-in mechanisms. More...

#include <IRenderingLogger.h>

+ Inheritance diagram for IRenderingLogger:

Public Types

enum class  MessageType {
  Progress , Info , Warning , Error ,
  Debug
}
 The message type is used to categorize and filter messages, according to user preferences. More...
 

Public Member Functions

virtual void LogMessage (const MessageType type, const MCHAR *message)=0
 Logs a message. More...
 
virtual void LogMessageOnce (const MessageType type, const MCHAR *message)=0
 Logs a message which should only reported once per render session. More...
 
virtual ~IRenderingLogger ()
 

Static Public Member Functions

static RenderingAPIExport std::unique_ptr< IRenderingLoggerAllocateInstance (const IRenderMessageManager::MessageSource message_source)
 Returns a new instance of this interface. More...
 
- 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

The Rendering API's interface for logging messages against 3ds Max build-in mechanisms.

This interface abstracts 3ds Max's internal message logging interfaces for the needs of a renderer. Internally, it logs the messages to the render message window, as well as to file, as necessary.

Member Enumeration Documentation

◆ MessageType

enum MessageType
strong

The message type is used to categorize and filter messages, according to user preferences.

Enumerator
Progress 

A message related to reporting progress information (usually as a percentage or count).

Info 

A message that provides useful information about the sate of the renderer, such as processing times.

Warning 

A message which flags a potential issue in rendering, but an issue which may not necessarily result in artifacts or otherwise undesirable results.

Error 

A message which flags an error, an issue which either prevents the renderer from continuing or which will almost certainly cause the rendered image to contain artifacts or undesirable/unexpected results.

Internally, these errors are reported as SYSLOG_WARN, and as such will not cause a network render to automatically abort.

Debug 

A debug message, which may be output to file, but which is typically not shown to the user.

48  {
50  Progress,
52  Info,
54  Warning,
58  Error,
60  Debug
61  };

Constructor & Destructor Documentation

◆ ~IRenderingLogger()

virtual ~IRenderingLogger ( )
inlinevirtual
76 {}

Member Function Documentation

◆ AllocateInstance()

static RenderingAPIExport std::unique_ptr<IRenderingLogger> AllocateInstance ( const IRenderMessageManager::MessageSource  message_source)
static

Returns a new instance of this interface.

In standard cases, this logging interface is created by the system and passed to the render session through IRenderSessionContext. But, should a renderer need access to the logger outside the bounds of a render session, or should it be needed by a renderer that does not derive from UnifiedRenderer, then a logger can be obtained through this method.

Parameters
message_sourceThe source of the messages, which determines which tab of the render message window receives the message.
Returns
A new instance of a rendering logger, which is then owned (and must be deleted) by the caller.

◆ LogMessage()

virtual void LogMessage ( const MessageType  type,
const MCHAR message 
)
pure virtual

Logs a message.

Parameters
typeThe type/category of the message.
messageThe actual message.

◆ LogMessageOnce()

virtual void LogMessageOnce ( const MessageType  type,
const MCHAR message 
)
pure virtual

Logs a message which should only reported once per render session.

Certain errors or events may be encountered numerous times during a translation or rendering process, and it may be undesirable to spam the user with identical, duplicate (error) messages. This method keeps a record of all the messages it has processed, ignoring all duplicates.

Remarks
To reset the state of the logger, i.e. enable reporting duplicate messages again, this interface must be destroyed and re-created.
Parameters
typeThe type/category of the message.
messageThe actual message.