3ds Max C++ API Reference
Loading...
Searching...
No Matches
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 MaxSDK::AssetManagement::AssetType *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.
 
virtual bool RecordNodeRefRemap (ReferenceMaker &aRefMaker, int aRefIdx, INode *aTargetNode, bool aIsIndirectRef)
 Records information needed to remap a reference to a node.
 
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
 
virtual LANGID FileUserLanguageID ()
 the user language id when the file was saved - kFileSaveAsVersionNotSpecified if not loaded from file
 
virtual DWORD FileSaveAsVersion ()
 the 'Save As' version number when the file was saved - kFileSaveAsVersionNotSpecified if not loaded from file
 
virtual UINT FileActiveCodePage ()
 the Active Code Page when the file was saved - kFileSaveAsVersionNotSpecified if not loaded from file
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
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.
 
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.
 
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.
 
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 voidoperator 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 voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_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.
 

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 
653 {
654 FORCEMERGE = (1 << 0)
655 };
@ FORCEMERGE
Definition: ioapi.h:654

Constructor & Destructor Documentation

◆ ~ILoad()

virtual ~ILoad ( )
inlinevirtual
657{};

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 nullptr 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.
752 {
753 return Read((void*)buf, nbytes, nwrit);
754 }
IOResult Read(const char *buf, ULONG nbytes, ULONG *nwrit)
Definition: ioapi.h:761

◆ ReadEnum()

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

◆ Read() [1/65]

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

◆ Read() [2/65]

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

◆ Read() [3/65]

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

◆ Read() [4/65]

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

◆ Read() [5/65]

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

◆ Read() [6/65]

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

◆ Read() [7/65]

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

◆ Read() [8/65]

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

◆ Read() [9/65]

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

◆ Read() [10/65]

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

◆ Read() [11/65]

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

◆ Read() [12/65]

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

◆ Read() [13/65]

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

◆ Read() [14/65]

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

◆ Read() [15/65]

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

◆ Read() [16/65]

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

◆ Read() [17/65]

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

◆ Read() [18/65]

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

◆ Read() [19/65]

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

◆ Read() [20/65]

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

◆ Read() [21/65]

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

◆ Read() [22/65]

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

◆ Read() [23/65]

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

◆ Read() [24/65]

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

◆ Read() [25/65]

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

◆ Read() [26/65]

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

◆ Read() [27/65]

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

◆ Read() [28/65]

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

◆ Read() [29/65]

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

◆ Read() [30/65]

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

◆ Read() [31/65]

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

◆ Read() [32/65]

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

◆ Read() [33/65]

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

◆ Read() [34/65]

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

◆ Read() [35/65]

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

◆ Read() [36/65]

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

◆ Read() [37/65]

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

◆ Read() [38/65]

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

◆ Read() [39/65]

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

◆ Read() [40/65]

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

◆ Read() [41/65]

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

◆ Read() [42/65]

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

◆ Read() [43/65]

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

◆ Read() [44/65]

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

◆ Read() [45/65]

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

◆ Read() [46/65]

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

◆ Read() [47/65]

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

◆ Read() [48/65]

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

◆ Read() [49/65]

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

◆ Read() [50/65]

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

◆ Read() [51/65]

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

◆ Read() [52/65]

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

◆ Read() [53/65]

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

◆ Read() [54/65]

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

◆ Read() [55/65]

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

◆ Read() [56/65]

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

◆ Read() [57/65]

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

◆ Read() [58/65]

IOResult Read ( const MaxSDK::AssetManagement::AssetType buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
991 {
992 return Read((void*)buf, nbytes, nwrit);
993 }

◆ Read() [59/65]

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

◆ Read() [60/65]

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

◆ Read() [61/65]

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

◆ Read() [62/65]

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

◆ Read() [63/65]

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

◆ Read() [64/65]

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

◆ Read() [65/65]

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

◆ 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 nullptr; }
1117 {
1118 return nullptr;
1119 }

◆ Execute()

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

◆ 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.
1144 {
1145 return 0;
1146 };

◆ 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
1165 {
1166 return false;
1167 }

◆ FileName()

virtual const MCHAR * FileName ( )
inlinevirtual
Remarks
Returns the name of the scene file being loaded.
1172 {
1173 return nullptr;
1174 }

◆ 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.
1180 {
1181 return IO_OK;
1182 }
@ IO_OK
The result was acceptable - no errors.
Definition: maxtypes.h:195

◆ CodePage()

virtual UINT CodePage ( ) const
inlinevirtual
1186 {
1187 return CP_ACP;
1188 }

◆ File3dsMaxLanguageID()

virtual WORD File3dsMaxLanguageID ( )
inlinevirtual

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

1197 {
1199 }
static const DWORD kFileSaveAsVersionNotSpecified
Definition: ioapi.h:1193

◆ FileUserLanguageID()

virtual LANGID FileUserLanguageID ( )
inlinevirtual

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

1202 {
1204 }

◆ FileSaveAsVersion()

virtual DWORD FileSaveAsVersion ( )
inlinevirtual

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

1208 {
1210 }

◆ FileActiveCodePage()

virtual UINT FileActiveCodePage ( )
inlinevirtual

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

1213 {
1215 }

Member Data Documentation

◆ kFileSaveAsVersionNotSpecified

const DWORD kFileSaveAsVersionNotSpecified = 0
static