3ds Max C++ API Reference
Loading...
Searching...
No Matches
ILoad Class Referenceabstract

#include <C:/adskgit/3dsmax/3dsmax/3dswin/src/maxsdk/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 
675 {
676 FORCEMERGE = (1 << 0)
677 };
@ FORCEMERGE
Definition ioapi.h:676

Constructor & Destructor Documentation

◆ ~ILoad()

virtual ~ILoad ( )
inlinevirtual
679{};

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.
774 {
775 return Read((void*)buf, nbytes, nwrit);
776 }
IOResult Read(const char *buf, ULONG nbytes, ULONG *nwrit)
Definition ioapi.h:783

◆ ReadEnum()

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

◆ Read() [1/66]

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

◆ Read() [2/66]

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

◆ Read() [3/66]

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

◆ Read() [4/66]

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

◆ Read() [5/66]

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

◆ Read() [6/66]

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

◆ Read() [7/66]

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

◆ Read() [8/66]

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

◆ Read() [9/66]

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

◆ Read() [10/66]

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

◆ Read() [11/66]

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

◆ Read() [12/66]

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

◆ Read() [13/66]

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

◆ Read() [14/66]

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

◆ Read() [15/66]

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

◆ Read() [16/66]

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

◆ Read() [17/66]

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

◆ Read() [18/66]

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

◆ Read() [19/66]

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

◆ Read() [20/66]

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

◆ Read() [21/66]

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

◆ Read() [22/66]

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

◆ Read() [23/66]

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

◆ Read() [24/66]

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

◆ Read() [25/66]

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

◆ Read() [26/66]

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

◆ Read() [27/66]

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

◆ Read() [28/66]

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

◆ Read() [29/66]

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

◆ Read() [30/66]

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

◆ Read() [31/66]

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

◆ Read() [32/66]

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

◆ Read() [33/66]

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

◆ Read() [34/66]

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

◆ Read() [35/66]

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

◆ Read() [36/66]

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

◆ Read() [37/66]

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

◆ Read() [38/66]

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

◆ Read() [39/66]

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

◆ Read() [40/66]

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

◆ Read() [41/66]

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

◆ Read() [42/66]

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

◆ Read() [43/66]

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

◆ Read() [44/66]

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

◆ Read() [45/66]

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

◆ Read() [46/66]

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

◆ Read() [47/66]

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

◆ Read() [48/66]

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

◆ Read() [49/66]

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

◆ Read() [50/66]

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

◆ Read() [51/66]

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

◆ Read() [52/66]

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

◆ Read() [53/66]

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

◆ Read() [54/66]

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

◆ Read() [55/66]

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

◆ Read() [56/66]

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

◆ Read() [57/66]

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

◆ Read() [58/66]

IOResult Read ( const MaxSDK::AssetManagement::AssetType * buf,
ULONG nbytes,
ULONG * nwrit )
inline
1013 {
1014 return Read((void*)buf, nbytes, nwrit);
1015 }

◆ Read() [59/66]

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

◆ Read() [60/66]

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

◆ Read() [61/66]

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

◆ Read() [62/66]

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

◆ Read() [63/66]

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

◆ Read() [64/66]

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

◆ Read() [65/66]

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

◆ Read() [66/66]

IOResult Read ( const MaxSDK::MaxGuid * buf,
ULONG nbytes,
ULONG * nwrit )
inline
1045 {
1046 return Read((void*)buf, nbytes, nwrit);
1047 }

◆ 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; }
1143 {
1144 return nullptr;
1145 }

◆ Execute()

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

◆ 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.
1170 {
1171 return 0;
1172 };

◆ 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
1191 {
1192 return false;
1193 }

◆ FileName()

virtual const MCHAR * FileName ( )
inlinevirtual
Remarks
Returns the name of the scene file being loaded.
1198 {
1199 return nullptr;
1200 }

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

◆ CodePage()

virtual UINT CodePage ( ) const
inlinevirtual
1212 {
1213 return CP_ACP;
1214 }

◆ File3dsMaxLanguageID()

virtual WORD File3dsMaxLanguageID ( )
inlinevirtual

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

1223 {
1225 }
static const DWORD kFileSaveAsVersionNotSpecified
Definition ioapi.h:1219

◆ FileUserLanguageID()

virtual LANGID FileUserLanguageID ( )
inlinevirtual

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

1228 {
1230 }

◆ FileSaveAsVersion()

virtual DWORD FileSaveAsVersion ( )
inlinevirtual

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

1234 {
1236 }

◆ FileActiveCodePage()

virtual UINT FileActiveCodePage ( )
inlinevirtual

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

1239 {
1241 }

Member Data Documentation

◆ kFileSaveAsVersionNotSpecified

const DWORD kFileSaveAsVersionNotSpecified = 0
static