|
| MPxCacheFormat () |
| The default class constructor. More...
|
|
virtual | ~MPxCacheFormat () |
| Class destructor. More...
|
|
virtual MStatus | open (const MString &fileName, FileAccessMode mode) |
| Attempt to open the specified cache format. More...
|
|
virtual void | close () |
| Close the current current cache file.
|
|
virtual MStatus | isValid () |
| Confirm whether the current cache file is valid. More...
|
|
virtual MStatus | rewind () |
| Rewind the current cache pointer to the start of the cache. More...
|
|
virtual MString | extension () |
| Returns the extension used by this format. More...
|
|
virtual MStatus | readHeader () |
| Read the header from the current cache file, and store any data that may be required. More...
|
|
virtual MStatus | writeHeader (const MString &version, MTime &startTime, MTime &endTime) |
| Write the header for the current cache. More...
|
|
virtual void | beginWriteChunk () |
| Perform any actions required prior to writing a chunk's information. More...
|
|
virtual void | endWriteChunk () |
| Perform any actions required after writing a chunk's information.
|
|
virtual MStatus | beginReadChunk () |
| Start the read process for this chunk. More...
|
|
virtual void | endReadChunk () |
| End the read process for this chunk. More...
|
|
virtual MStatus | writeTime (MTime &time) |
| Write the current time to the cache. More...
|
|
virtual MStatus | readTime (MTime &time) |
| Read the current time from the cache. More...
|
|
virtual MStatus | findTime (MTime &time, MTime &foundTime) |
| Find a specific time in the cache. More...
|
|
virtual MStatus | readNextTime (MTime &foundTime) |
| Read the next time from the cache. More...
|
|
virtual unsigned | readArraySize () |
| Read the size of an array in the cache. More...
|
|
virtual MStatus | writeDoubleArray (const MDoubleArray &) |
| Write an array of doubles to the cache. More...
|
|
virtual MStatus | writeFloatArray (const MFloatArray &) |
| Write a array of floats to the cache. More...
|
|
virtual MStatus | writeIntArray (const MIntArray &) |
| Write a array of int to the cache. More...
|
|
virtual MStatus | writeDoubleVectorArray (const MVectorArray &array) |
| Write an array of double-precision vectors to the cache. More...
|
|
virtual MStatus | writeFloatVectorArray (const MFloatVectorArray &array) |
| Write an array of single-precision vectors to the cache. More...
|
|
virtual MStatus | writeInt32 (int) |
| Write an integer to the cache. More...
|
|
virtual MStatus | readDoubleArray (MDoubleArray &, unsigned size) |
| Read an array of doubles from the cache. More...
|
|
virtual MStatus | readFloatArray (MFloatArray &, unsigned size) |
| Read an array of floats from the cache. More...
|
|
virtual MStatus | readIntArray (MIntArray &, unsigned size) |
| Read an array of ints from the cache. More...
|
|
virtual MStatus | readDoubleVectorArray (MVectorArray &, unsigned arraySize) |
| Read an array of double-precision vectors from the cache. More...
|
|
virtual MStatus | readFloatVectorArray (MFloatVectorArray &array, unsigned arraySize) |
| Read an array of single-precision vectors from the cache. More...
|
|
virtual int | readInt32 () |
| Read an integer from the cache. More...
|
|
virtual MStatus | writeChannelName (const MString &name) |
| Write a channel to the cache. More...
|
|
virtual MStatus | findChannelName (const MString &name) |
| Seek to a specific channel in the cache. More...
|
|
virtual MStatus | readChannelName (MString &name) |
| Find the next channel name. More...
|
|
virtual bool | handlesDescription () |
| Report whether this format handles the format description itself (usually provided by the default xml description file). More...
|
|
virtual MStatus | readDescription (MCacheFormatDescription &description, const MString &descriptionFileLocation, const MString &baseFileName) |
| Obtain the format description information. More...
|
|
virtual MStatus | writeDescription (const MCacheFormatDescription &description, const MString &descriptionFileLocation, const MString &baseFileName) |
| Store the format description information. More...
|
|
CacheFormat definition.
The MPxCacheFormat class can be used to implement support for new cache file formats in Maya.
- Examples:
- XmlGeometryCache/XmlGeometryCache.cpp, and XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.
Obtain the format description information.
If the format returns true for handlesDescription(), then it must implement this method. The implementation should in turn call MCacheFormatDescription::setDistribution(), setTimePerFrame(), addDescriptionInfo() and addChannel() as appropriate using the supplied description object.
In the default implementation, the xml description file is stored at descriptionFileLocation + baseFileName + ".xml"
- Parameters
-
[out] | description | the description object to be set up |
[in] | descriptionFileLocation | the default location of the description file |
[in] | baseFileName | the default file name (without extension) of the description file |
- Returns
- MS::kSuccess if the description was successfully read
- MS::kFailure otherwise
Store the format description information.
If the format returns true for handlesDescription(), then it must implement this method. The implementation should in turn call MCacheFormatDescription::getDistribution(), getTimePerFrame(), getStartAndEndTimes(), getDescriptionInfo(), getNumChannels() and the various getChannelXXX() methods using the supplied description object as appropriate and store this information in such a way that it can be retrieved by readDescription().
In the default implementation, the xml description file is stored at descriptionFileLocation + baseFileName + ".xml"
Note that the plug-in is not required to store the description in a file using descriptionFileLocation and baseFileName. However, it must be able to retrieve the same description using just these strings to identify the source of the data.
- Parameters
-
[in] | description | the description object that describes the format |
[in] | descriptionFileLocation | the default location of the description file |
[in] | baseFileName | the default file name (without extension) of the description file |
- Returns
- MS::kSuccess if the description was successfully read
- MS::kFailure otherwise