3ds Max C++ API Reference
Util.h File Reference
#include <WTypes.h>
#include "../strbasic.h"
#include "../maxnet_types.h"
#include "MaxNetExport.h"

Enumerations

enum  MAXNET_PLATFORM { MAXNET_PLATFORM_NATIVE = 0 , MAXNET_PLATFORM_32BIT = 32 , MAXNET_PLATFORM_64BIT =64 }
 

Functions

MAXNETEXPORT MaxNetManagerCreateManager ()
 
MAXNETEXPORT void DestroyManager (MaxNetManager *mgr)
 
MAXNETEXPORT bool jobReadMAXProperties (const MCHAR *max_filename, Job *job, CJobText &jobText)
 
MAXNETEXPORT void jobSetJobDefaults (Job *job)
 
MAXNETEXPORT void NumberedFilename (MCHAR *infile, MCHAR *outfile, int number)
 
MAXNETEXPORT bool IsMacNull (BYTE *addr)
 
MAXNETEXPORT bool GetMacAddress (BYTE *addr)
 
MAXNETEXPORT bool MatchMacAddress (BYTE *addr1, BYTE *addr2)
 
MAXNETEXPORT void Mac2String (BYTE *addr, MCHAR *string)
 
MAXNETEXPORT void Mac2StringCondensed (BYTE *addr, MCHAR *string)
 
MAXNETEXPORT void StringCondensed2Mac (MCHAR *string, BYTE *addr)
 
MAXNETEXPORT void InitConfigurationInfo (ConfigurationBlock &cb, MCHAR workdisk=0)
 
MAXNETEXPORT bool MatchServers (HSERVER srv1, HSERVER srv2)
 
MAXNETEXPORT bool Maz (const MCHAR *archivename, MCHAR *file_list, DWORD *filesize=0)
 
MAXNETEXPORT bool UnMaz (const MCHAR *archivename, const MCHAR *output_path)
 
MAXNETEXPORT MCHARResString (int id, MCHAR *buffer=0)
 
MAXNETEXPORT bool ConvertOldJobFile (const MCHAR *oldFile, const MCHAR *newFile)
 
MAXNETEXPORT MaxNetManagerCreateManager (int platform)
 
MAXNETEXPORT bool ConvertOldJobFile (const MCHAR *oldFile, const MCHAR *newFile, int platform)
 

Enumeration Type Documentation

◆ MAXNET_PLATFORM

Enumerator
MAXNET_PLATFORM_NATIVE 
MAXNET_PLATFORM_32BIT 
MAXNET_PLATFORM_64BIT 
102  {
106 };
@ MAXNET_PLATFORM_32BIT
Definition: Util.h:104
@ MAXNET_PLATFORM_64BIT
Definition: Util.h:105
@ MAXNET_PLATFORM_NATIVE
Definition: Util.h:103

Function Documentation

◆ CreateManager() [1/2]

MAXNETEXPORT MaxNetManager* CreateManager ( )
Remarks
This method will create and return a new instance of the MaxNetManager class.

◆ DestroyManager()

MAXNETEXPORT void DestroyManager ( MaxNetManager mgr)
Remarks
This method will destroy an instance of the MaxNetManager class.
Parameters:
MaxNetManager* mgr

Points to the MaxNetManager object to destroy.

◆ jobReadMAXProperties()

MAXNETEXPORT bool jobReadMAXProperties ( const MCHAR max_filename,
Job job,
CJobText jobText 
)
Remarks
This function will initialize a job structure using the data read from a specified 3ds Max scene file. If you would want to submit a job based on a 3ds Max file alone, you would call this function passing it to the file specified. This function takes care of filling all the fields so you can turn around and just send the job to the queue..
Parameters:
char* filename

The filename of the 3ds Max scene file (*.max).

Job* job

A pointer to an empty job structure which will be initialized by the method. Because the function will initialize the structure any values present prior to calling this method will be reset.

CJobText& jobText

A reference to an empty CJobText class which will be initialized by the function. Just like the job structure, any values present prior to calling this function will be reset.
Returns
TRUE if reading the properties was successful, otherwise FALSE.

◆ jobSetJobDefaults()

MAXNETEXPORT void jobSetJobDefaults ( Job job)
Remarks
This function will set the default values for the given Job structure. You can use this function to prevent frequent resetting of the structure and its default fields such as size, version, etc.
Parameters:
Job *job

The job structure containing the information about the job. See the Job structure description for an explanation.

◆ NumberedFilename()

MAXNETEXPORT void NumberedFilename ( MCHAR infile,
MCHAR outfile,
int  number 
)

◆ IsMacNull()

MAXNETEXPORT bool IsMacNull ( BYTE *  addr)

◆ GetMacAddress()

MAXNETEXPORT bool GetMacAddress ( BYTE *  addr)

◆ MatchMacAddress()

MAXNETEXPORT bool MatchMacAddress ( BYTE *  addr1,
BYTE *  addr2 
)

◆ Mac2String()

MAXNETEXPORT void Mac2String ( BYTE *  addr,
MCHAR string 
)

◆ Mac2StringCondensed()

MAXNETEXPORT void Mac2StringCondensed ( BYTE *  addr,
MCHAR string 
)

◆ StringCondensed2Mac()

MAXNETEXPORT void StringCondensed2Mac ( MCHAR string,
BYTE *  addr 
)

◆ InitConfigurationInfo()

MAXNETEXPORT void InitConfigurationInfo ( ConfigurationBlock cb,
MCHAR  workdisk = 0 
)

◆ MatchServers()

MAXNETEXPORT bool MatchServers ( HSERVER  srv1,
HSERVER  srv2 
)

◆ Maz()

MAXNETEXPORT bool Maz ( const MCHAR archivename,
MCHAR file_list,
DWORD *  filesize = 0 
)
Remarks
This function creates a Network Rendering archive. This is the archive sent to the manager when submitting a new job. Note that even though you can use whatever name you feel like, the Manager and Servers will look for a "jobname.maz" file.
Parameters:
MCHAR* archivename

The full path and filename of the archive you want to create.

MCHAR* file_list

A list of NULL terminated filenames to include in the archive. You should provide a full path and filename. However, only the file names will be saved in the archive and all files are going to be un-archived in the same directory.

An example: file_list[] = {"c:\\path\\file.maz/0c:\\anotherpath\\maps.tga/0/0"};

DWORD* filesize

Optional pointer to a variable to receive the accumulated size of all files included in the archive. This is the "uncompressed" size. You can use this to compute the disk space necessary to uncompress the archive.
Returns
TRUE if the archive was successfully created, otherwise FALSE.

◆ UnMaz()

MAXNETEXPORT bool UnMaz ( const MCHAR archivename,
const MCHAR output_path 
)
Remarks
This function is the opposite of Maz() and will un-archive the given archive into the specified directory.
Parameters:
MCHAR* archivename

The full path and filename of the archive you want to un-archive.

MCHAR* output_path

The path you want the files extracted to.
Returns
TRUE if the archive was successfully extracted, otherwise FALSE.

◆ ResString()

MAXNETEXPORT MCHAR* ResString ( int  id,
MCHAR buffer = 0 
)

◆ ConvertOldJobFile() [1/2]

MAXNETEXPORT bool ConvertOldJobFile ( const MCHAR oldFile,
const MCHAR newFile 
)

◆ CreateManager() [2/2]

MAXNETEXPORT MaxNetManager* CreateManager ( int  platform)

◆ ConvertOldJobFile() [2/2]

MAXNETEXPORT bool ConvertOldJobFile ( const MCHAR oldFile,
const MCHAR newFile,
int  platform 
)