This reference page is linked to from the following overview topics: Loading and Saving Plug-in Data, Changing Parameter Types, Indirect References and Object XRefs, Serializing Controllers, Post-Load Callbacks, Backward Compatibility, Loading Old Parameter Data using IParamBlock2.
#include <ioapi.h>
Public Types |
|
enum | BPFlag { FORCEMERGE = (1<<0) } |
Public Member Functions |
|
virtual | ~ILoad () |
virtual void * | GetAddr (int imaker)=0 |
virtual void | RecordBackpatch (int imaker, void **patchThis, DWORD flags=0)=0 |
virtual void | SetRootAddr (void *addr)=0 |
virtual void * | GetRootAddr ()=0 |
virtual IOResult | OpenChunk ()=0 |
virtual USHORT | CurChunkID ()=0 |
virtual ChunkType | CurChunkType ()=0 |
virtual ULONGLONG | CurChunkLength ()=0 |
virtual ULONGLONG | CurChunkLengthRemaining ()=0 |
virtual int | CurChunkDepth ()=0 |
virtual IOResult | CloseChunk ()=0 |
virtual USHORT | PeekNextChunkID ()=0 |
IOResult | ReadVoid (const void *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | ReadEnum (const void *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const char *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const wchar_t *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const int *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const unsigned int *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const INT64 *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const UINT64 *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const float *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const double *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const short *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const unsigned short *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const long *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const unsigned long *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const BYTE *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const bool *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const Point2 *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const Point3 *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const Point4 *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const AColor *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const Color *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const Matrix2 *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const Matrix3 *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const Box2 *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const Box3 *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const MNVert *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const TVPatch *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const Face *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const Class_ID *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const VertMove *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const FaceCreate *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const FaceRemap *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const FaceChange *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const FaceSmooth *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const UVVertSet *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const TVFace *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const Interval *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const AngAxis *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const Quat *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const Ray *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const ScaleValue *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const RotationValue *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const FBox2 *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const HookPoint *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const PolyPt *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const bindShape *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const EPMapVert *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const EPMapPatch *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const EPMapUVVert *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const RandGenerator *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const Interface_ID *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const BlockKeysClass *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const Color24 *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const Color48 *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const Color64 *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const POINT *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const WINDOWPLACEMENT *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const range *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const MaxSDK::AssetManagement::AssetId *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const ParamType2 *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const FloatChange *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const VertOffset *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const ParticleID *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const PreciseTimeValue *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const DeviceRect *buf, ULONG nbytes, ULONG *nwrit) |
IOResult | Read (const IPoint2 *buf, ULONG nbytes, ULONG *nwrit) |
virtual IOResult | ReadWStringChunk (char **buf)=0 |
virtual IOResult | ReadWStringChunk (wchar_t **buf)=0 |
virtual IOResult | ReadCStringChunk (char **buf)=0 |
virtual IOResult | ReadCStringChunk (wchar_t **buf)=0 |
virtual void | SetObsolete ()=0 |
virtual void | RegisterPostLoadCallback (PostLoadCallback *cb)=0 |
virtual const MCHAR * | GetDir (int which)=0 |
virtual FileIOType | DoingWhat ()=0 |
virtual INode * | RootNode ()=0 |
virtual ClassDesc * | GetClassDesc (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 MCHAR * | FileName () |
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 |
|
Static Public Attributes |
|
static const DWORD | kFileSaveAsVersionNotSpecified = 0 |
enum BPFlag |
{ FORCEMERGE = (1<<0) };
virtual ~ILoad | ( | ) | [inline, virtual] |
{};
virtual void* GetAddr | ( | int | imaker | ) | [pure virtual] |
imaker | This is the index returned from ISave::GetRefID(). that was used to save the pointer. |
virtual void RecordBackpatch | ( | int | imaker, |
void ** | patchThis, | ||
DWORD | flags = 0 |
||
) | [pure virtual] |
imaker | This is the index returned from ISave::GetRefID(). |
patchThis | This is a pointer to the pointer you want patched. |
flags | This flag indicates that backpatches (and their subsequent references) should be merged as well. |
virtual void SetRootAddr | ( | void * | addr | ) | [pure virtual] |
virtual void* GetRootAddr | ( | ) | [pure virtual] |
virtual IOResult OpenChunk | ( | ) | [pure virtual] |
virtual USHORT CurChunkID | ( | ) | [pure virtual] |
virtual ChunkType CurChunkType | ( | ) | [pure virtual] |
virtual ULONGLONG CurChunkLength | ( | ) | [pure virtual] |
virtual ULONGLONG CurChunkLengthRemaining | ( | ) | [pure virtual] |
virtual int CurChunkDepth | ( | ) | [pure virtual] |
virtual IOResult CloseChunk | ( | ) | [pure virtual] |
virtual USHORT PeekNextChunkID | ( | ) | [pure virtual] |
IOResult ReadVoid | ( | const void * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
buf | A pointer to the buffer to read. |
nbytes | The number of bytes to read. |
nread | The number of bytes that were read. |
{return Read((void*)buf, nbytes, nwrit);}
IOResult ReadEnum | ( | const void * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
IOResult Read | ( | const char * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const wchar_t * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const int * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const unsigned int * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const INT64 * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const UINT64 * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const float * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const double * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const short * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const unsigned short * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const long * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const unsigned long * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const BYTE * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const bool * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const FaceCreate * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const FaceChange * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const FaceSmooth * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const ScaleValue * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const RotationValue * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const EPMapVert * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const EPMapPatch * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const EPMapUVVert * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const RandGenerator * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const Interface_ID * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const BlockKeysClass * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const POINT * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const WINDOWPLACEMENT * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const range * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const MaxSDK::AssetManagement::AssetId * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const ParamType2 * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const FloatChange * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const VertOffset * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const ParticleID * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const PreciseTimeValue * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
IOResult Read | ( | const DeviceRect * | buf, |
ULONG | nbytes, | ||
ULONG * | nwrit | ||
) | [inline] |
{return Read((void*)buf, nbytes, nwrit);}
{return Read((void*)buf, nbytes, nwrit);}
virtual IOResult ReadWStringChunk | ( | char ** | buf | ) | [pure virtual] |
buf | A pointer to an array of characters. |
virtual IOResult ReadWStringChunk | ( | wchar_t ** | buf | ) | [pure virtual] |
buf | A pointer to an array of wide characters. |
virtual IOResult ReadCStringChunk | ( | char ** | buf | ) | [pure virtual] |
buf | A 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. |
virtual IOResult ReadCStringChunk | ( | wchar_t ** | buf | ) | [pure virtual] |
buf | A 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. |
virtual void SetObsolete | ( | ) | [pure virtual] |
virtual void RegisterPostLoadCallback | ( | PostLoadCallback * | cb | ) | [pure virtual] |
cb | Points to the callback object. |
virtual const MCHAR* GetDir | ( | int | which | ) | [pure virtual] |
which | Specifies the directory name to retrieve. See MAX Directory IDs. The constants are defined in MAXAPI.H |
virtual FileIOType DoingWhat | ( | ) | [pure virtual] |
virtual INode* RootNode | ( | ) | [pure virtual] |
virtual ClassDesc* GetClassDesc | ( | USHORT | refID | ) | [inline, virtual] |
refID | The reference ID in the ClassDirectory stream. |
{ return NULL; }
virtual INT_PTR Execute | ( | int | cmd, |
ULONG_PTR | arg1 = 0 , |
||
ULONG_PTR | arg2 = 0 , |
||
ULONG_PTR | arg3 = 0 |
||
) | [inline, virtual] |
{ return 0; }
virtual DWORD GetFileSaveVersion | ( | ) | [inline, virtual] |
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.
{ return 0; };
virtual bool RecordNodeRefRemap | ( | ReferenceMaker & | aRefMaker, |
int | aRefIdx, | ||
INode * | aTargetNode, | ||
bool | aIsIndirectRef | ||
) | [inline, virtual] |
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.
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 |
{return false;}
virtual const MCHAR* FileName | ( | ) | [inline, virtual] |
{ return NULL; }
virtual IOResult LoadAssetMetaData | ( | ) | [inline, virtual] |
{ return IO_OK; }
virtual UINT CodePage | ( | ) | const [inline, virtual] |
{ return CP_ACP; }
virtual WORD File3dsMaxLanguageID | ( | ) | [inline, virtual] |
the 3dsmax language id when the file was saved - kFileSaveAsVersionNotSpecified if not loaded from file
{ return kFileSaveAsVersionNotSpecified; }
virtual LANGID FileUserLanguageID | ( | ) | [inline, virtual] |
the user language id when the file was saved - kFileSaveAsVersionNotSpecified if not loaded from file
{ return kFileSaveAsVersionNotSpecified; }
virtual DWORD FileSaveAsVersion | ( | ) | [inline, virtual] |
the 'Save As' version number when the file was saved - kFileSaveAsVersionNotSpecified if not loaded from file
{ return kFileSaveAsVersionNotSpecified; }
virtual UINT FileActiveCodePage | ( | ) | [inline, virtual] |
the Active Code Page when the file was saved - kFileSaveAsVersionNotSpecified if not loaded from file
{ return kFileSaveAsVersionNotSpecified; }
const DWORD kFileSaveAsVersionNotSpecified
= 0 [static] |