3ds Max C++ API Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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)
 
IOResult Read (const MaxSDK::MaxGuid *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 MSTR GetDir (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 
662 {
663 FORCEMERGE = (1 << 0)
664 };
@ FORCEMERGE
Definition: ioapi.h:663

Constructor & Destructor Documentation

◆ ~ILoad()

virtual ~ILoad ( )
inlinevirtual
666{};

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

◆ ReadEnum()

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

◆ Read() [1/66]

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

◆ Read() [2/66]

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

◆ Read() [3/66]

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

◆ Read() [4/66]

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

◆ Read() [5/66]

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

◆ Read() [6/66]

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

◆ Read() [7/66]

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

◆ Read() [8/66]

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

◆ Read() [9/66]

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

◆ Read() [10/66]

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

◆ Read() [11/66]

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

◆ Read() [12/66]

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

◆ Read() [13/66]

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

◆ Read() [14/66]

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

◆ Read() [15/66]

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

◆ Read() [16/66]

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

◆ Read() [17/66]

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

◆ Read() [18/66]

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

◆ Read() [19/66]

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

◆ Read() [20/66]

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

◆ Read() [21/66]

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

◆ Read() [22/66]

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

◆ Read() [23/66]

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

◆ Read() [24/66]

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

◆ Read() [25/66]

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

◆ Read() [26/66]

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

◆ Read() [27/66]

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

◆ Read() [28/66]

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

◆ Read() [29/66]

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

◆ Read() [30/66]

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

◆ Read() [31/66]

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

◆ Read() [32/66]

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

◆ Read() [33/66]

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

◆ Read() [34/66]

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

◆ Read() [35/66]

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

◆ Read() [36/66]

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

◆ Read() [37/66]

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

◆ Read() [38/66]

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

◆ Read() [39/66]

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

◆ Read() [40/66]

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

◆ Read() [41/66]

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

◆ Read() [42/66]

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

◆ Read() [43/66]

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

◆ Read() [44/66]

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

◆ Read() [45/66]

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

◆ Read() [46/66]

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

◆ Read() [47/66]

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

◆ Read() [48/66]

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

◆ Read() [49/66]

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

◆ Read() [50/66]

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

◆ Read() [51/66]

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

◆ Read() [52/66]

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

◆ Read() [53/66]

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

◆ Read() [54/66]

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

◆ Read() [55/66]

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

◆ Read() [56/66]

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

◆ Read() [57/66]

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

◆ Read() [58/66]

IOResult Read ( const MaxSDK::AssetManagement::AssetType buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
1000 {
1001 return Read((void*)buf, nbytes, nwrit);
1002 }

◆ Read() [59/66]

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

◆ Read() [60/66]

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

◆ Read() [61/66]

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

◆ Read() [62/66]

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

◆ Read() [63/66]

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

◆ Read() [64/66]

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

◆ Read() [65/66]

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

◆ Read() [66/66]

IOResult Read ( const MaxSDK::MaxGuid buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
1032 {
1033 return Read((void*)buf, nbytes, nwrit);
1034 }

◆ 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 MSTR 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; }
1130 {
1131 return nullptr;
1132 }

◆ Execute()

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

◆ 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.
1157 {
1158 return 0;
1159 };

◆ 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
1178 {
1179 return false;
1180 }

◆ FileName()

virtual const MCHAR * FileName ( )
inlinevirtual
Remarks
Returns the name of the scene file being loaded.
1185 {
1186 return nullptr;
1187 }

◆ 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.
1193 {
1194 return IO_OK;
1195 }
@ IO_OK
The result was acceptable - no errors.
Definition: maxtypes.h:203

◆ CodePage()

virtual UINT CodePage ( ) const
inlinevirtual
1199 {
1200 return CP_ACP;
1201 }

◆ File3dsMaxLanguageID()

virtual WORD File3dsMaxLanguageID ( )
inlinevirtual

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

1210 {
1212 }
static const DWORD kFileSaveAsVersionNotSpecified
Definition: ioapi.h:1206

◆ FileUserLanguageID()

virtual LANGID FileUserLanguageID ( )
inlinevirtual

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

1215 {
1217 }

◆ FileSaveAsVersion()

virtual DWORD FileSaveAsVersion ( )
inlinevirtual

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

1221 {
1223 }

◆ FileActiveCodePage()

virtual UINT FileActiveCodePage ( )
inlinevirtual

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

1226 {
1228 }

Member Data Documentation

◆ kFileSaveAsVersionNotSpecified

const DWORD kFileSaveAsVersionNotSpecified = 0
static