3ds Max C++ API Reference
ILoad Class Referenceabstract

#include <ioapi.h>

+ Inheritance diagram for ILoad:

Public Types

enum  BPFlag { FORCEMERGE = (1<<0) }
 

Public Member Functions

virtual ~ILoad ()
 
virtual voidGetAddr (int imaker)=0
 
virtual void RecordBackpatch (int imaker, void **patchThis, DWORD flags=0)=0
 
virtual void SetRootAddr (void *addr)=0
 
virtual voidGetRootAddr ()=0
 
virtual IOResult OpenChunk ()=0
 
virtual USHORT CurChunkID ()=0
 
virtual ChunkType CurChunkType ()=0
 
virtual ULONGLONG CurChunkLength ()=0
 
virtual ULONGLONG CurChunkLengthRemaining ()=0
 
virtual int CurChunkDepth ()=0
 
virtual IOResult CloseChunk ()=0
 
virtual USHORT PeekNextChunkID ()=0
 
IOResult ReadVoid (const void *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult ReadEnum (const void *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const char *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const wchar_t *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const int *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const unsigned int *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const INT64 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const UINT64 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const float *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const double *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const short *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const unsigned short *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const long *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const unsigned long *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const BYTE *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const bool *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const Point2 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const Point3 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const Point4 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const AColor *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const Color *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const Matrix2 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const Matrix3 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const Box2 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const Box3 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const MNVert *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const TVPatch *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const Face *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const Class_ID *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const VertMove *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const FaceCreate *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const FaceRemap *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const FaceChange *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const FaceSmooth *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const UVVertSet *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const TVFace *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const Interval *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const AngAxis *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const Quat *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const Ray *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const ScaleValue *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const RotationValue *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const FBox2 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const HookPoint *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const PolyPt *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const bindShape *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const EPMapVert *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const EPMapPatch *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const EPMapUVVert *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const RandGenerator *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const Interface_ID *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const BlockKeysClass *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const Color24 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const Color48 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const Color64 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const POINT *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const WINDOWPLACEMENT *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const range *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const MaxSDK::AssetManagement::AssetId *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const ParamType2 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const FloatChange *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const VertOffset *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const ParticleID *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const PreciseTimeValue *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const DeviceRect *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Read (const IPoint2 *buf, ULONG nbytes, ULONG *nwrit)
 
virtual IOResult ReadWStringChunk (char **buf)=0
 
virtual IOResult ReadWStringChunk (wchar_t **buf)=0
 
virtual IOResult ReadCStringChunk (char **buf)=0
 
virtual IOResult ReadCStringChunk (wchar_t **buf)=0
 
virtual void SetObsolete ()=0
 
virtual void RegisterPostLoadCallback (PostLoadCallback *cb)=0
 
virtual const MCHARGetDir (int which)=0
 
virtual FileIOType DoingWhat ()=0
 
virtual INodeRootNode ()=0
 
virtual ClassDescGetClassDesc (USHORT refID)
 
virtual INT_PTR Execute (int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0)
 
virtual DWORD GetFileSaveVersion ()
 Retrieves the version and build number of 3ds Max used to save the file being loaded. More...
 
virtual bool RecordNodeRefRemap (ReferenceMaker &aRefMaker, int aRefIdx, INode *aTargetNode, bool aIsIndirectRef)
 Records information needed to remap a reference to a node. More...
 
virtual const MCHARFileName ()
 
virtual IOResult LoadAssetMetaData ()
 
virtual UINT CodePage () const
 
virtual WORD File3dsMaxLanguageID ()
 the 3dsmax language id when the file was saved - kFileSaveAsVersionNotSpecified if not loaded from file More...
 
virtual LANGID FileUserLanguageID ()
 the user language id when the file was saved - kFileSaveAsVersionNotSpecified if not loaded from file More...
 
virtual DWORD FileSaveAsVersion ()
 the 'Save As' version number when the file was saved - kFileSaveAsVersionNotSpecified if not loaded from file More...
 
virtual UINT FileActiveCodePage ()
 the Active Code Page when the file was saved - kFileSaveAsVersionNotSpecified if not loaded from file More...
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Static Public Attributes

static const DWORD kFileSaveAsVersionNotSpecified = 0
 

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

See also
Loading and Saving Plug-in Data, Guidelines for Handling Character Strings, Class ISave, Class PostLoadCallback, Class INode, Class ClassDesc, Class ClassDirectory, Class Interface.

Description:
This class provides methods to load data from disk and to register post load callbacks.

Note: It is not valid, to write two CStrs in the same chunk of a 3ds Max file, since ILoad::ReadCStringChunk() sets the size for the string to the ChunkSize. However it is possible to write other data, such as two ints, into the same chunk.

All methods of this class are implemented by the system.

Member Enumeration Documentation

◆ BPFlag

enum BPFlag
Enumerator
FORCEMERGE 
416  {
417  FORCEMERGE = (1<<0)
418  };
@ FORCEMERGE
Definition: ioapi.h:417

Constructor & Destructor Documentation

◆ ~ILoad()

virtual ~ILoad ( )
inlinevirtual
420 {};

Member Function Documentation

◆ GetAddr()

virtual void* GetAddr ( int  imaker)
pure virtual
Remarks
This method may be used to load a pointer from disk. It returns the memory address of the specified object Scene stream. This may be NULL if the address is not available. See RecordBackpatch() above for a work around.
Parameters
imakerThis is the index returned from ISave::GetRefID(). that was used to save the pointer.

◆ RecordBackpatch()

virtual void RecordBackpatch ( int  imaker,
void **  patchThis,
DWORD  flags = 0 
)
pure virtual
Remarks
This method may be used to load a pointer from disk. This is a pointer that was saved using ISave::GetRefID(). You pass the index returned from GetRefID() and a pointer to a pointer that will get set. This method will patch the address immediately if it is available, otherwise it will happen later when it is known. During the load process if you need to work with this information you'll have to use a post load callback since all the addresses are not updated immediately. See RegisterPostLoadCallback() above.
Parameters
imakerThis is the index returned from ISave::GetRefID().
patchThisThis is a pointer to the pointer you want patched.
flagsThis flag indicates that backpatches (and their subsequent references) should be merged as well.

◆ SetRootAddr()

virtual void SetRootAddr ( void addr)
pure virtual
Remarks
This method is used internally.

◆ GetRootAddr()

virtual void* GetRootAddr ( )
pure virtual
Remarks
This method is used internally.

◆ OpenChunk()

virtual IOResult OpenChunk ( )
pure virtual
Remarks
This method is used to open a chunk. If OpenChunk() returns IO_OK, use the following 3 functions to get the info about the chunk. If it returns IO_END this indicates there are no more chunks at this level.
Returns
IO_OK - The result was acceptable - no errors.

IO_END - This is returned from ILoad::OpenChunk() when the end of the chunks at a certain level have been reached. It is used as a signal to terminates the processing of chunks at that level.

IO_ERROR - This is returned if an error occurred. Note that the plug-in should not put up a message box if a read error occurred. It should simply return the error status. This prevents a overabundance of messages from appearing.

◆ CurChunkID()

virtual USHORT CurChunkID ( )
pure virtual
Remarks
This method returns the ID of the most recently opened chunk.

◆ CurChunkType()

virtual ChunkType CurChunkType ( )
pure virtual
Remarks
This method returns the type of the most recently opened chunk. This may be one of the following values:

NEW_CHUNK

CONTAINER_CHUNK

DATA_CHUNK

◆ CurChunkLength()

virtual ULONGLONG CurChunkLength ( )
pure virtual
Remarks
This method returns the chunk length NOT including the header.

◆ CurChunkLengthRemaining()

virtual ULONGLONG CurChunkLengthRemaining ( )
pure virtual
Remarks
Number of data bytes remaining in chunk NOT including header.

◆ CurChunkDepth()

virtual int CurChunkDepth ( )
pure virtual
Remarks
This method is used internally for checking for balanced OpenChunk/CloseChunk pairs.

◆ CloseChunk()

virtual IOResult CloseChunk ( )
pure virtual
Remarks
This method is used to close the currently opened chunk, and position at the next chunk.
Returns
A return value of IO_ERROR indicates there is no open chunk to close; otherwise IO_OK.

◆ PeekNextChunkID()

virtual USHORT PeekNextChunkID ( )
pure virtual
Remarks
This method returns the ID of the next chunk without opening it. It returns 0 if there are no more chunks.

◆ ReadVoid()

IOResult ReadVoid ( const void buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
Remarks
This method is used to read a block of bytes from the output stream.
Parameters
bufA pointer to the buffer to read.
nbytesThe number of bytes to read.
nwritThe number of bytes that were read.
Returns
A return value of IO_ERROR indicates an error occurred, otherwise IO_OK.
514 {return Read((void*)buf, nbytes, nwrit);}
IOResult Read(const char *buf, ULONG nbytes, ULONG *nwrit)
Definition: ioapi.h:517

◆ ReadEnum()

IOResult ReadEnum ( const void buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
515 {DbgAssert(nbytes == sizeof(int)); return Read((void*)buf, nbytes, nwrit);}
#define DbgAssert(expr)
Definition: assert1.h:82

◆ Read() [1/64]

IOResult Read ( const char *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
517 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [2/64]

IOResult Read ( const wchar_t *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
518 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [3/64]

IOResult Read ( const int buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
520 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [4/64]

IOResult Read ( const unsigned int buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
521 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [5/64]

IOResult Read ( const INT64 *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
522 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [6/64]

IOResult Read ( const UINT64 *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
523 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [7/64]

IOResult Read ( const float *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
524 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [8/64]

IOResult Read ( const double *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
525 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [9/64]

IOResult Read ( const short *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
526 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [10/64]

IOResult Read ( const unsigned short *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
527 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [11/64]

IOResult Read ( const long *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
528 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [12/64]

IOResult Read ( const unsigned long *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
529 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [13/64]

IOResult Read ( const BYTE *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
530 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [14/64]

IOResult Read ( const bool *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
531 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [15/64]

IOResult Read ( const Point2 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
532 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [16/64]

IOResult Read ( const Point3 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
533 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [17/64]

IOResult Read ( const Point4 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
534 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [18/64]

IOResult Read ( const AColor buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
535 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [19/64]

IOResult Read ( const Color buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
536 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [20/64]

IOResult Read ( const Matrix2 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
537 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [21/64]

IOResult Read ( const Matrix3 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
538 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [22/64]

IOResult Read ( const Box2 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
539 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [23/64]

IOResult Read ( const Box3 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
540 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [24/64]

IOResult Read ( const MNVert buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
541 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [25/64]

IOResult Read ( const TVPatch buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
542 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [26/64]

IOResult Read ( const Face buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
543 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [27/64]

IOResult Read ( const Class_ID buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
544 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [28/64]

IOResult Read ( const VertMove buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
545 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [29/64]

IOResult Read ( const FaceCreate buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
546 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [30/64]

IOResult Read ( const FaceRemap buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
547 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [31/64]

IOResult Read ( const FaceChange buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
548 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [32/64]

IOResult Read ( const FaceSmooth buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
549 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [33/64]

IOResult Read ( const UVVertSet buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
550 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [34/64]

IOResult Read ( const TVFace buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
551 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [35/64]

IOResult Read ( const Interval buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
552 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [36/64]

IOResult Read ( const AngAxis buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
553 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [37/64]

IOResult Read ( const Quat buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
554 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [38/64]

IOResult Read ( const Ray buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
555 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [39/64]

IOResult Read ( const ScaleValue buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
556 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [40/64]

IOResult Read ( const RotationValue buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
557 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [41/64]

IOResult Read ( const FBox2 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
558 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [42/64]

IOResult Read ( const HookPoint buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
559 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [43/64]

IOResult Read ( const PolyPt buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
560 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [44/64]

IOResult Read ( const bindShape buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
561 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [45/64]

IOResult Read ( const EPMapVert *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
562 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [46/64]

IOResult Read ( const EPMapPatch *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
563 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [47/64]

IOResult Read ( const EPMapUVVert *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
564 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [48/64]

IOResult Read ( const RandGenerator buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
565 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [49/64]

IOResult Read ( const Interface_ID buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
566 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [50/64]

IOResult Read ( const BlockKeysClass *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
567 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [51/64]

IOResult Read ( const Color24 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
568 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [52/64]

IOResult Read ( const Color48 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
569 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [53/64]

IOResult Read ( const Color64 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
570 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [54/64]

IOResult Read ( const POINT *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
571 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [55/64]

IOResult Read ( const WINDOWPLACEMENT *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
572 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [56/64]

IOResult Read ( const range *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
573 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [57/64]

IOResult Read ( const MaxSDK::AssetManagement::AssetId buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
574 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [58/64]

IOResult Read ( const ParamType2 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
575 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [59/64]

IOResult Read ( const FloatChange *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
576 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [60/64]

IOResult Read ( const VertOffset *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
577 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [61/64]

IOResult Read ( const ParticleID buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
578 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [62/64]

IOResult Read ( const PreciseTimeValue buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
579 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [63/64]

IOResult Read ( const DeviceRect buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
580 {return Read((void*)buf, nbytes, nwrit);}

◆ Read() [64/64]

IOResult Read ( const IPoint2 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
581 {return Read((void*)buf, nbytes, nwrit);}

◆ ReadWStringChunk() [1/2]

virtual IOResult ReadWStringChunk ( char **  buf)
pure virtual
Remarks
This method read a string that was stored as Wide characters. Note: This method reads a string from a string chunk. It is assumed the chunk is already open, it will NOT close the chunk.
Parameters
bufA pointer to an array of characters.
Returns
A return value of IO_ERROR indicates an error occurred, otherwise IO_OK.

◆ ReadWStringChunk() [2/2]

virtual IOResult ReadWStringChunk ( wchar_t **  buf)
pure virtual
Remarks
This method read a string that was stored as Wide chars. Note: This method reads a string from a string chunk. It is assumed the chunk is already open, it will NOT close the chunk.
Parameters
bufA pointer to an array of wide characters.
Returns
A return value of IO_ERROR indicates an error occurred, otherwise IO_OK.

◆ ReadCStringChunk() [1/2]

virtual IOResult ReadCStringChunk ( char **  buf)
pure virtual
Remarks
This method reads a string that was stored as single byte characters.
Parameters
bufA pointer to an array of single byte characters. This method will allocate an internal buffer, stored in the ILoadImp class that is big enough to hold the string chunk read in. You must then copy or parse out the data and store it in your own area: you can't hang on to the string pointer it hands back because it will not be valid.
Returns
A return value of IO_ERROR indicates an error occurred, otherwise IO_OK.

◆ ReadCStringChunk() [2/2]

virtual IOResult ReadCStringChunk ( wchar_t **  buf)
pure virtual
Remarks
This method may be used to read a string that was stored as single byte characters.
Parameters
bufA pointer to an array of wide characters. This method will allocate an internal buffer, stored in the ILoadImp class that is big enough to hold the string chunk read in. You must then copy or parse out the data and store it in your own area: you can't hang on to the string pointer it hands back because it will not be valid.
Returns
A return value of IO_ERROR indicates an error occurred, otherwise IO_OK.

◆ SetObsolete()

virtual void SetObsolete ( )
pure virtual
Remarks
You may call this if you encounter obsolete data to cause a message to be displayed after loading.

◆ RegisterPostLoadCallback()

virtual void RegisterPostLoadCallback ( PostLoadCallback cb)
pure virtual
Remarks
Registers a procedure to be called after loading. These will be called in the order that they are registered. It is assumed that if the callback needs to be deleted, the proc will do it.
Parameters
cbPoints to the callback object.

◆ GetDir()

virtual const MCHAR* GetDir ( int  which)
pure virtual
Remarks
Retrieves the specified standard 3ds Max directory name (fonts, scenes, images, ...).
Parameters
whichSpecifies the directory name to retrieve. See MAX Directory IDs. The constants are defined in MAXAPI.H
Returns
The name of the specified directory.

◆ DoingWhat()

virtual FileIOType DoingWhat ( )
pure virtual
Remarks
Determines if we are loading a standard 3ds Max file (.MAX) or a material library (.MAT).
Returns
One of the following values:

IOTYPE_MAX

IOTYPE_MATLIB

◆ RootNode()

virtual INode* RootNode ( )
pure virtual
Remarks
Returns the root node to attach to when loading a node with no parent.

◆ GetClassDesc()

virtual ClassDesc* GetClassDesc ( USHORT  refID)
inlinevirtual
Remarks
This method is available in release 3.0 and later only.

Returns a pointer to the ClassDesc corresponding to the specified reference ID in the ClassDirectory stream.
Parameters
refIDThe reference ID in the ClassDirectory stream.
Default Implementation:
{ return NULL; }
677 { return NULL; }
#define NULL
Definition: autoptr.h:18

◆ Execute()

virtual INT_PTR Execute ( int  cmd,
ULONG_PTR  arg1 = 0,
ULONG_PTR  arg2 = 0,
ULONG_PTR  arg3 = 0 
)
inlinevirtual
679 { return 0; }

◆ GetFileSaveVersion()

virtual DWORD GetFileSaveVersion ( )
inlinevirtual

Retrieves the version and build number of 3ds Max used to save the file being loaded.

Plugins can call this method when loading a max file is being loaded.

Returns
A value describing the version of 3ds Max used to save the file. The value is composed of a LOWORD(value)= Build number, and a HIWORD(value) = MAX_RELEASE. For example, 41 for build #41, and 4000 for 3ds Max version 4.0
Note
Plugins should not rely on the value returned by this function for versioning their own data saved to the max file. Plugins should rather use either:
  • Parameter block versioning for versioning data stored in parameter blocks. See IParamBlock2::GetVersion() and the P_VERSION flag for versioning instances of class ParamBlockDesc2.
  • Their own versioning scheme for data that is not stored in a parameter block. Loading and saving a max file in the absence of the plugin will maintain its data intact, but the max version and build numbers will be updated, so next time the file is loaded in the presence of the plugin, the max version number could be different than when the plugin data was saved.
698 { return 0; };

◆ RecordNodeRefRemap()

virtual bool RecordNodeRefRemap ( ReferenceMaker aRefMaker,
int  aRefIdx,
INode aTargetNode,
bool  aIsIndirectRef 
)
inlinevirtual

Records information needed to remap a reference to a node.

References to nodes held by object-xrefed reference makers need to be remapped when updating xref records. In most cases, Max will automatically record data required to remap node references when xrefing objects. Plug-ins that save node pointers into the max file need to be modified to indirectly reference the node, in order for that plug-in to be xref-able. For the legacy version of the plugin to be xref-able, the plugin must record in a PostLoadCallback information needed for remapping the indirect reference it makes to nodes. This can be done by calling this method.

Parameters
aRefMaker- A scene entity that makes a reference to a node
aRefIdx- The index of the reference aRefMaker makes to a node
aTargetNode- The node being referenced
aIsIndirectRef- If true, the reference to the node is indirect, otherwise it's a regular reference
Returns
- true if a node-ref-remap entry was recorded successfully, false otherwise
716 {return false;}

◆ FileName()

virtual const MCHAR* FileName ( )
inlinevirtual
Remarks
Returns the name of the scene file being loaded.
720 { return NULL; }

◆ LoadAssetMetaData()

virtual IOResult LoadAssetMetaData ( )
inlinevirtual
Remarks
This method is used by Asset Manager to load from the scene file all asset meta data.
Returns
A return value of IO_ERROR indicates an error occurred, otherwise IO_OK.
725 { return IO_OK; }
@ IO_OK
The result was acceptable - no errors.
Definition: maxtypes.h:282

◆ CodePage()

virtual UINT CodePage ( ) const
inlinevirtual
728 { return CP_ACP; }

◆ File3dsMaxLanguageID()

virtual WORD File3dsMaxLanguageID ( )
inlinevirtual

the 3dsmax language id when the file was saved - kFileSaveAsVersionNotSpecified if not loaded from file

static const DWORD kFileSaveAsVersionNotSpecified
Definition: ioapi.h:732

◆ FileUserLanguageID()

virtual LANGID FileUserLanguageID ( )
inlinevirtual

the user language id when the file was saved - kFileSaveAsVersionNotSpecified if not loaded from file

◆ FileSaveAsVersion()

virtual DWORD FileSaveAsVersion ( )
inlinevirtual

the 'Save As' version number when the file was saved - kFileSaveAsVersionNotSpecified if not loaded from file

◆ FileActiveCodePage()

virtual UINT FileActiveCodePage ( )
inlinevirtual

the Active Code Page when the file was saved - kFileSaveAsVersionNotSpecified if not loaded from file

Member Data Documentation

◆ kFileSaveAsVersionNotSpecified

const DWORD kFileSaveAsVersionNotSpecified = 0
static