Network Rendering
 
 
 

The network rendering API is exposed through the MaxNetManager class which allows clients to connect to the Network Rendering Manager to perform any and all functions offered. The API handles all the networking code and communication protocols.

Within 3ds Max, the Network Job Assignment dialog uses the Network Rendering API to submit new jobs to the network queue while the Queue Manager uses the API to provide all of its functionality. Neither of these components have any other type of network access or private access to network rendering facilities. The MaxNet API provides all of these itself.

The entire API is derived from the MaxNet class, which is used solely for exception handling. In order to handle exceptions you can catch a MaxNet object as follows:

try
{
   // the code being tried
}
catch (MaxNet* maxerr)
{
   // handle the error
   // do NOT delete maxerr
   // use maxerr->GetErrorText() to get the error description
   // use maxerr->GetError() to get the error code
}

The MaxNet class provides the error code in both numeric form, through GetError() in the form of maxnet_error_ttype, and in text form, through GetErrorText(). Most methods in the Network Rendering API will return errors only through this mechamisn, particularly methods that handle network transactions.

The Network Rendering API provides two functions that deal with the creation and destruction of the MaxNetManager class instance, these are, CreateManager() and DestroyManager(). The CreateManager() function will return a newly created instance of the MaxNetManager class which can be deleted, when done, by DestroyManager().

Queue Control

At any given moment, only one connected client can be in control of the network queue. This means, only one connected client can perform changes. All other clients operate in a "read only" mode.

MaxNetCallBack

The Network Rendering API provides a callback mechanism through the MaxNetManager class. If you wish to use the callback mechanism you can create your own class derived from MaxNetCallBack and pass it as the argument for MaxNetManager::SetCallBack(). All methods are optional, thus you only need to implement those you require.