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)
IOResult Read (const ChannelMask *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 
680 {
681 FORCEMERGE = (1 << 0)
682 };
@ FORCEMERGE
Definition ioapi.h:681

Constructor & Destructor Documentation

◆ ~ILoad()

virtual ~ILoad ( )
inlinevirtual
684{};

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.
779 {
780 return Read((void*)buf, nbytes, nwrit);
781 }
IOResult Read(const char *buf, ULONG nbytes, ULONG *nwrit)
Definition ioapi.h:788

◆ ReadEnum()

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

◆ Read() [1/67]

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

◆ Read() [2/67]

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

◆ Read() [3/67]

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

◆ Read() [4/67]

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

◆ Read() [5/67]

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

◆ Read() [6/67]

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

◆ Read() [7/67]

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

◆ Read() [8/67]

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

◆ Read() [9/67]

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

◆ Read() [10/67]

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

◆ Read() [11/67]

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

◆ Read() [12/67]

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

◆ Read() [13/67]

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

◆ Read() [14/67]

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

◆ Read() [15/67]

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

◆ Read() [16/67]

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

◆ Read() [17/67]

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

◆ Read() [18/67]

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

◆ Read() [19/67]

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

◆ Read() [20/67]

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

◆ Read() [21/67]

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

◆ Read() [22/67]

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

◆ Read() [23/67]

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

◆ Read() [24/67]

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

◆ Read() [25/67]

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

◆ Read() [26/67]

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

◆ Read() [27/67]

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

◆ Read() [28/67]

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

◆ Read() [29/67]

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

◆ Read() [30/67]

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

◆ Read() [31/67]

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

◆ Read() [32/67]

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

◆ Read() [33/67]

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

◆ Read() [34/67]

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

◆ Read() [35/67]

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

◆ Read() [36/67]

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

◆ Read() [37/67]

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

◆ Read() [38/67]

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

◆ Read() [39/67]

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

◆ Read() [40/67]

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

◆ Read() [41/67]

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

◆ Read() [42/67]

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

◆ Read() [43/67]

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

◆ Read() [44/67]

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

◆ Read() [45/67]

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

◆ Read() [46/67]

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

◆ Read() [47/67]

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

◆ Read() [48/67]

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

◆ Read() [49/67]

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

◆ Read() [50/67]

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

◆ Read() [51/67]

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

◆ Read() [52/67]

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

◆ Read() [53/67]

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

◆ Read() [54/67]

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

◆ Read() [55/67]

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

◆ Read() [56/67]

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

◆ Read() [57/67]

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

◆ Read() [58/67]

IOResult Read ( const MaxSDK::AssetManagement::AssetType * buf,
ULONG nbytes,
ULONG * nwrit )
inline
1018 {
1019 return Read((void*)buf, nbytes, nwrit);
1020 }

◆ Read() [59/67]

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

◆ Read() [60/67]

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

◆ Read() [61/67]

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

◆ Read() [62/67]

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

◆ Read() [63/67]

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

◆ Read() [64/67]

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

◆ Read() [65/67]

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

◆ Read() [66/67]

IOResult Read ( const MaxSDK::MaxGuid * buf,
ULONG nbytes,
ULONG * nwrit )
inline
1050 {
1051 return Read((void*)buf, nbytes, nwrit);
1052 }

◆ Read() [67/67]

IOResult Read ( const ChannelMask * buf,
ULONG nbytes,
ULONG * nwrit )
inline
1054 {
1055 return Read((void*)buf, nbytes, nwrit);
1056 }

◆ 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; }
1152 {
1153 return nullptr;
1154 }

◆ Execute()

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

◆ 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.
1179 {
1180 return 0;
1181 };

◆ 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
1200 {
1201 return false;
1202 }

◆ FileName()

virtual const MCHAR * FileName ( )
inlinevirtual
Remarks
Returns the name of the scene file being loaded.
1207 {
1208 return nullptr;
1209 }

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

◆ CodePage()

virtual UINT CodePage ( ) const
inlinevirtual
1221 {
1222 return CP_ACP;
1223 }

◆ File3dsMaxLanguageID()

virtual WORD File3dsMaxLanguageID ( )
inlinevirtual

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

1232 {
1234 }
static const DWORD kFileSaveAsVersionNotSpecified
Definition ioapi.h:1228

◆ FileUserLanguageID()

virtual LANGID FileUserLanguageID ( )
inlinevirtual

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

1237 {
1239 }

◆ FileSaveAsVersion()

virtual DWORD FileSaveAsVersion ( )
inlinevirtual

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

1243 {
1245 }

◆ FileActiveCodePage()

virtual UINT FileActiveCodePage ( )
inlinevirtual

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

1248 {
1250 }

Member Data Documentation

◆ kFileSaveAsVersionNotSpecified

const DWORD kFileSaveAsVersionNotSpecified = 0
static