3ds Max C++ API Reference
ISave Class Referenceabstract

#include <ioapi.h>

+ Inheritance diagram for ISave:

Public Member Functions

virtual ~ISave ()
 
virtual int GetRefID (void *ptarg)=0
 
virtual void BeginChunk (USHORT id)=0
 
virtual void EndChunk ()=0
 
virtual int CurChunkDepth ()=0
 
IOResult WriteVoid (const void *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult WriteEnum (const void *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const char *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const wchar_t *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const int *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const unsigned int *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const INT64 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const UINT64 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const float *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const double *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const short *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const unsigned short *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const long *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const unsigned long *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const BYTE *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const bool *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const Point2 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const Point3 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const Point4 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const AColor *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const Color *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const Matrix2 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const Matrix3 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const Box2 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const Box3 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const MNVert *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const TVPatch *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const Face *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const Class_ID *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const VertMove *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const FaceCreate *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const FaceRemap *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const FaceChange *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const FaceSmooth *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const UVVertSet *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const TVFace *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const Interval *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const AngAxis *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const Quat *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const Ray *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const ScaleValue *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const RotationValue *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const FBox2 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const HookPoint *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const PolyPt *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const bindShape *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const EPMapVert *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const EPMapPatch *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const EPMapUVVert *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const RandGenerator *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const Interface_ID *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const BlockKeysClass *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const Color24 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const Color48 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const Color64 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const POINT *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const WINDOWPLACEMENT *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const range *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const MaxSDK::AssetManagement::AssetId *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const ParamType2 *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const FloatChange *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const VertOffset *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const ParticleID *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const PreciseTimeValue *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const DeviceRect *buf, ULONG nbytes, ULONG *nwrit)
 
IOResult Write (const IPoint2 *buf, ULONG nbytes, ULONG *nwrit)
 
virtual IOResult WriteWString (const char *str)=0
 
virtual IOResult WriteWString (const wchar_t *str)=0
 
virtual IOResult WriteCString (const char *str)=0
 
virtual IOResult WriteCString (const wchar_t *str)=0
 
virtual FileIOType DoingWhat ()=0
 
virtual DWORD SavingVersion () const
 
virtual USHORT GetClassDescID (ReferenceMaker *rm)
 
virtual INT_PTR Execute (int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0)
 
virtual const MCHARFileName ()
 
virtual IOResult SaveAssetMetaData (const MaxSDK::AssetManagement::AssetId &assetId)
 
virtual bool SaveAssetAsAssetIDGuid ()
 
virtual UINT CodePage () const
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Detailed Description

See also
Loading and Saving Plug-in Data, Guidelines for Handling Character Strings, Class ILoad, Class ClassDesc, Class ClassDirectory, Class Interface.

Description:
This class provides methods to save data to disk.

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.

Note about member alignment: Please make sure that when you save data from your plugin you save individual data members using a chunk ID instead of saving the image of a class. Saving (and loading) a class image puts you at risk of running into member alignment problems and as such could potentially corrupt saved files. File IO would be put further at risk when you keep Intel's IA-64 architecture in mind which depends on member alignment. What you should not do is outlined in the following example when loading a class image; iload->Read(&myclass, sizeof(MyClass), &ab);

Once you change the class in such a way that it affects the data size you run the risk of having to support different versions, file IO incompatibility, and member alignment issues.

The following global function is not part of this class but is available for use:

Constructor & Destructor Documentation

◆ ~ISave()

virtual ~ISave ( )
inlinevirtual
188 {};

Member Function Documentation

◆ GetRefID()

virtual int GetRefID ( void ptarg)
pure virtual
Remarks
This method is not normally used because the reference hierarchy is saved automatically. In certain cases however this method is quite useful. This method is used in saving a pointer to some object (or a table of pointers). This is a pointer to one of the objects that the scene saves with the reference hierarchy, but it is not a pointer that itself is a reference.
Parameters
ptargThe pointer to save.
Returns
The id that may be saved to disk.

◆ BeginChunk()

virtual void BeginChunk ( USHORT  id)
pure virtual
Remarks
This method is used to begin a chunk. The ID passed need only be unique within the plug-ins data itself.
Parameters
idThe id for the chunk.

◆ EndChunk()

virtual void EndChunk ( )
pure virtual
Remarks
This method is used to end a chunk, and back-patch the length.

◆ CurChunkDepth()

virtual int CurChunkDepth ( )
pure virtual
Remarks
This method is used internally for checking balanced BeginChunk/EndChunk.

◆ WriteVoid()

IOResult WriteVoid ( const void buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
Remarks
This method writes a block of bytes to the output stream.
Parameters
bufThe buffer to write.
nbytesThe number of bytes to write.
nwritThe number of bytes actually written.
Returns
IO_OK - The write was acceptable - no errors.

IO_ERROR - This is returned if an error occurred. Note that the plug-in should not put up a message box if a write error occurs. It should simply return the error status. This prevents a overabundance of messages from appearing.
227 {return Write((void*)buf, nbytes, nwrit);}
IOResult Write(const char *buf, ULONG nbytes, ULONG *nwrit)
Definition: ioapi.h:230

◆ WriteEnum()

IOResult WriteEnum ( const void buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
228 {DbgAssert(nbytes == sizeof(int)); return Write((void*)buf, nbytes, nwrit);}
#define DbgAssert(expr)
Definition: assert1.h:82

◆ Write() [1/64]

IOResult Write ( const char *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
231  {
232  DbgAssert( buf == NULL || strlen(buf) <= nbytes);
233  return Write((void*)buf, nbytes, nwrit);
234  }
#define NULL
Definition: autoptr.h:18

◆ Write() [2/64]

IOResult Write ( const wchar_t *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
236  {
237  DbgAssert( buf == NULL || wcslen(buf) <= nbytes);
238  return Write((void*)buf, nbytes, nwrit);
239  }

◆ Write() [3/64]

IOResult Write ( const int buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
241 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [4/64]

IOResult Write ( const unsigned int buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
242 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [5/64]

IOResult Write ( const INT64 *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
243 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [6/64]

IOResult Write ( const UINT64 *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
244 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [7/64]

IOResult Write ( const float *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
245 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [8/64]

IOResult Write ( const double *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
246 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [9/64]

IOResult Write ( const short *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
247 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [10/64]

IOResult Write ( const unsigned short *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
248 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [11/64]

IOResult Write ( const long *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
249 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [12/64]

IOResult Write ( const unsigned long *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
250 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [13/64]

IOResult Write ( const BYTE *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
251 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [14/64]

IOResult Write ( const bool *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
252 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [15/64]

IOResult Write ( const Point2 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
253 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [16/64]

IOResult Write ( const Point3 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
254 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [17/64]

IOResult Write ( const Point4 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
255 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [18/64]

IOResult Write ( const AColor buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
256 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [19/64]

IOResult Write ( const Color buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
257 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [20/64]

IOResult Write ( const Matrix2 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
258 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [21/64]

IOResult Write ( const Matrix3 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
259 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [22/64]

IOResult Write ( const Box2 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
260 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [23/64]

IOResult Write ( const Box3 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
261 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [24/64]

IOResult Write ( const MNVert buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
262 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [25/64]

IOResult Write ( const TVPatch buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
263 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [26/64]

IOResult Write ( const Face buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
264 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [27/64]

IOResult Write ( const Class_ID buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
265 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [28/64]

IOResult Write ( const VertMove buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
266 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [29/64]

IOResult Write ( const FaceCreate buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
267 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [30/64]

IOResult Write ( const FaceRemap buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
268 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [31/64]

IOResult Write ( const FaceChange buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
269 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [32/64]

IOResult Write ( const FaceSmooth buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
270 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [33/64]

IOResult Write ( const UVVertSet buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
271 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [34/64]

IOResult Write ( const TVFace buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
272 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [35/64]

IOResult Write ( const Interval buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
273 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [36/64]

IOResult Write ( const AngAxis buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
274 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [37/64]

IOResult Write ( const Quat buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
275 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [38/64]

IOResult Write ( const Ray buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
276 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [39/64]

IOResult Write ( const ScaleValue buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
277 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [40/64]

IOResult Write ( const RotationValue buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
278 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [41/64]

IOResult Write ( const FBox2 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
279 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [42/64]

IOResult Write ( const HookPoint buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
280 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [43/64]

IOResult Write ( const PolyPt buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
281 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [44/64]

IOResult Write ( const bindShape buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
282 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [45/64]

IOResult Write ( const EPMapVert *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
283 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [46/64]

IOResult Write ( const EPMapPatch *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
284 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [47/64]

IOResult Write ( const EPMapUVVert *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
285 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [48/64]

IOResult Write ( const RandGenerator buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
286 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [49/64]

IOResult Write ( const Interface_ID buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
287 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [50/64]

IOResult Write ( const BlockKeysClass *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
288 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [51/64]

IOResult Write ( const Color24 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
289 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [52/64]

IOResult Write ( const Color48 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
290 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [53/64]

IOResult Write ( const Color64 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
291 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [54/64]

IOResult Write ( const POINT *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
292 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [55/64]

IOResult Write ( const WINDOWPLACEMENT *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
293 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [56/64]

IOResult Write ( const range *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
294 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [57/64]

IOResult Write ( const MaxSDK::AssetManagement::AssetId buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
295 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [58/64]

IOResult Write ( const ParamType2 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
296 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [59/64]

IOResult Write ( const FloatChange *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
297 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [60/64]

IOResult Write ( const VertOffset *  buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
298 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [61/64]

IOResult Write ( const ParticleID buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
299 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [62/64]

IOResult Write ( const PreciseTimeValue buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
300 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [63/64]

IOResult Write ( const DeviceRect buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
301 {return Write((void*)buf, nbytes, nwrit);}

◆ Write() [64/64]

IOResult Write ( const IPoint2 buf,
ULONG  nbytes,
ULONG *  nwrit 
)
inline
302 {return Write((void*)buf, nbytes, nwrit);}

◆ WriteWString() [1/2]

virtual IOResult WriteWString ( const char *  str)
pure virtual
Remarks
This method is used to write wide character strings.
Parameters
strThe string to write. The string must be ACP encoded.
Returns
IO_OK - The write was acceptable - no errors.

IO_ERROR - This is returned if an error occurred.

◆ WriteWString() [2/2]

virtual IOResult WriteWString ( const wchar_t *  str)
pure virtual
Remarks
This method is used to write wide character strings.
Parameters
strThe string to write.
Returns
IO_OK - The write was acceptable - no errors.

IO_ERROR - This is returned if an error occurred.

◆ WriteCString() [1/2]

virtual IOResult WriteCString ( const char *  str)
pure virtual
Remarks
This method is used to write single byte character strings.
Parameters
strThe string to write. The string must be ACP encoded.
Returns
IO_OK - The write was acceptable - no errors.

IO_ERROR - This is returned if an error occurred.

◆ WriteCString() [2/2]

virtual IOResult WriteCString ( const wchar_t *  str)
pure virtual
Remarks
This method is used to write single byte character strings.
Parameters
strThe string to write.
Returns
IO_OK - The write was acceptable - no errors.

IO_ERROR - This is returned if an error occurred.

◆ DoingWhat()

virtual FileIOType DoingWhat ( )
pure virtual
Remarks
Determines if we are saving a standard 3ds Max file (.MAX) or a material library (.MAT).
Returns
One of the following values:

IOTYPE_MAX

IOTYPE_MATLIB

◆ SavingVersion()

virtual DWORD SavingVersion ( ) const
inlinevirtual
Remarks
This method returns a value to indicate the current version of the file being saved. It returns 0 for the current version, MAX_RELEASE_R12 for 3ds Max 2010, etc. Call this method to determine the format in which to save the data.
  • Adding a new chunk (unknown to the previous version) should be fine. Plug-ins should be written to skip over unknown chunks.
  • Removing a chunk is not fine. Never delete a chunk id. Plug-ins need to be prepared to save out the data corresponding to the old chunk id when this method returns the version of a previous 3ds Max release.
  • Changing the contents of an existent chunk is not fine, since it can break file compatibility. Add a new chunk to store the modified data structure, and keep the code that loads the old chunk. Be prepared to convert the old data to the new format if that makes sense.
See also
GetSavingVersion(), Version Macros
355 { return 0; }

◆ GetClassDescID()

virtual USHORT GetClassDescID ( ReferenceMaker rm)
inlinevirtual
Remarks
This method is available in release 3.0 and later only.

This method returns a load reference ID for the given Reference Maker's ClassDesc object in the ClassDirectory stream.
Parameters
rmPoints to the reference maker.
Default Implementation:
{ return 0xffff; }
365 { return NO_CLASSDESC_ID_RETURNED; }
#define NO_CLASSDESC_ID_RETURNED
Definition: ioapi.h:158

◆ Execute()

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

◆ FileName()

virtual const MCHAR* FileName ( )
inlinevirtual
Remarks
Returns the name of the scene file being saved.
371 { return NULL; }

◆ SaveAssetMetaData()

virtual IOResult SaveAssetMetaData ( const MaxSDK::AssetManagement::AssetId assetId)
inlinevirtual
Remarks
This method is used by Asset Manager to save to the scene file the asset meta data.
Parameters
assetIdThe id for the asset.
Returns
A return value of IO_ERROR indicates an error occurred, otherwise IO_OK.
377 { return IO_OK; }
@ IO_OK
The result was acceptable - no errors.
Definition: maxtypes.h:282

◆ SaveAssetAsAssetIDGuid()

virtual bool SaveAssetAsAssetIDGuid ( )
inlinevirtual
Remarks
This method is used to tell when to store an asset as a guid rather than as the asset filename.
Returns
A return value of true indicates to store eassets as guids, otherwise as the asset filename.
382 { return false; }

◆ CodePage()

virtual UINT CodePage ( ) const
inlinevirtual
386 { return CP_UTF8; }