#include <MPxCacheFormat.h>
The MPxCacheFormat class can be used to implement support for new cache file formats in Maya.
Public Types | |
enum | FileAccessMode { kRead, kWrite, kReadWrite } |
Cache file access modes. More... | |
Public Member Functions | |
virtual MStatus | open (const MString &fileName, FileAccessMode mode) |
virtual void | close () |
Close the current current cache file. | |
virtual MStatus | isValid () |
Confirm wether the current cache file is valid. | |
virtual MStatus | rewind () |
Rewind to the beginning of the cache. | |
virtual MString | extension () |
virtual MStatus | readHeader () |
virtual MStatus | writeHeader (const MString &version, MTime &startTime, MTime &endTime) |
virtual void | beginWriteChunk () |
virtual void | endWriteChunk () |
virtual MStatus | beginReadChunk () |
virtual void | endReadChunk () |
virtual MStatus | writeTime (MTime &time) |
virtual MStatus | readTime (MTime &time) |
virtual MStatus | findTime (MTime &time, MTime &foundTime) |
Find a specific time in the cache. | |
virtual MStatus | readNextTime (MTime &foundTime) |
Find the next time in the cache. | |
virtual unsigned | readArraySize () |
Extract size information from the cache. | |
virtual MStatus | writeDoubleArray (const MDoubleArray &) |
Write data to the cache. | |
virtual MStatus | readDoubleArray (MDoubleArray &, unsigned size) |
Read data from the cache. | |
virtual MStatus | writeChannelName (const MString &name) |
Write a channel's name to the cache. Each cached object is contained within a separate channel. | |
virtual MStatus | findChannelName (const MString &name) |
Seek to a specific channel name in the cache. | |
virtual MStatus | readChannelName (MString &name) |
Read the next channel name in the cache. |
virtual MStatus MPxCacheFormat::open | ( | const MString & | fileName, | |
FileAccessMode | mode | |||
) | [virtual] |
Attempt to open the specified cache format. It is important that this function only return success if the cache file is definitely supported by this implementation.
[in] | fileName | Name of the cache file to open |
[in] | mode | Access mode for the cache file |
virtual MString MPxCacheFormat::extension | ( | ) | [virtual] |
Provide the disk file extension for this format. This is not the same as the format's key, which is used by the plugin to identify itself.
virtual MStatus MPxCacheFormat::readHeader | ( | ) | [virtual] |
Read the header from the current cache data file, and store any data that may be required.
virtual void MPxCacheFormat::beginWriteChunk | ( | ) | [virtual] |
Perform any actions required prior to writing a chunk's information. A chunk contains the cache information for a specfic time, and may contain multiple channels.
virtual void MPxCacheFormat::endWriteChunk | ( | ) | [virtual] |
Perform any actions required after writing a chunk's information. A chunk contains the cache information for a specfic time, and may contain multiple channels.
virtual MStatus MPxCacheFormat::beginReadChunk | ( | ) | [virtual] |
Perform any actions required prior to reading a chunk's information. A chunk contains the cache information for a specfic time, and may contain multiple channels.
virtual void MPxCacheFormat::endReadChunk | ( | ) | [virtual] |
Perform any actions required after reading a chunk's information. A chunk contains the cache information for a specfic time, and may contain multiple channels.
Write the current time to the cache.
[in] | time | Time to write. |
Read the current time from the cache.
[out] | time | Variable to read the time value into. |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |