C++ API Reference
MCacheFormatDescription Class Reference

Cache format description. More...

#include <MCacheFormatDescription.h>

Public Types

enum  CacheFileDistribution { kNoFile, kOneFile, kOneFilePerFrame }
 Cache file distribution types. More...
 
enum  CacheDataType {
  kUnknownData, kDouble, kDoubleArray, kDoubleVectorArray,
  kInt32Array, kFloatArray, kFloatVectorArray
}
 Cache file data types. More...
 
enum  CacheSamplingType { kRegular, kIrregular }
 Cache file sampling types. More...
 

Public Member Functions

void setDistribution (CacheFileDistribution distribution)
 Set up the cache format when reading the description file. More...
 
void setTimePerFrame (const MTime &timePerFrame)
 Set the time per frame. More...
 
void addDescriptionInfo (const MString &info)
 Add a descriptive string. More...
 
unsigned int addChannel (const MString &channelName, const MString &interpretation, CacheDataType dataType, CacheSamplingType samplingType, const MTime &samplingRate, const MTime &startTime, const MTime &endTime, MStatus *status=NULL)
 Add a channel. More...
 
CacheFileDistribution getDistribution () const
 Get information about the format in order to write the description file. More...
 
MTime getTimePerFrame () const
 Get the time per frame. More...
 
void getStartAndEndTimes (MTime &startTime, MTime &endTime) const
 Get the start and end times. More...
 
void getDescriptionInfo (MStringArray &info) const
 This method is not available in Python. More...
 
MStringArray getDescriptionInfo () const
 Get the descriptive strings. More...
 
unsigned int getNumChannels () const
 Get the number of channels. More...
 
MString getChannelName (unsigned int channelIndex) const
 Get a channel's name. More...
 
MString getChannelInterpretation (unsigned int channelIndex) const
 Get a channel's intepretation. More...
 
CacheDataType getChannelDataType (unsigned int channelIndex) const
 Get a channel's data type. More...
 
CacheSamplingType getChannelSamplingType (unsigned int channelIndex) const
 Get a channel's sampling type. More...
 
MTime getChannelSamplingRate (unsigned int channelIndex) const
 Get a channel's sampling rate. More...
 
MTime getChannelStartTime (unsigned int channelIndex) const
 Get a channel's start time. More...
 
MTime getChannelEndTime (unsigned int channelIndex) const
 Get a channel's end time. More...
 
virtual ~MCacheFormatDescription ()
 Class destructor.
 

Static Public Member Functions

static const char * className ()
 Returns the name of this class. More...
 

Detailed Description

Cache format description.

The MCacheFormatDescription is a utility class used by MPxCacheFormat when implementing custom cache plug-ins that define their own handling of the cache format (usually provided by Maya's own xml format).

Examples:
XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.

Member Enumeration Documentation

Cache file distribution types.

Enumerator
kNoFile 

just memory cache

kOneFile 

one file for all frames

kOneFilePerFrame 

one file per frame

Cache file data types.

Enumerator
kUnknownData 

unknown data

kDouble 

a single double value

kDoubleArray 

an array of double values

kDoubleVectorArray 

an array of double vector values

kInt32Array 

an array of int32 values

kFloatArray 

an array of float values

kFloatVectorArray 

an array of float vector values

Cache file sampling types.

Enumerator
kRegular 

regular sampling

kIrregular 

irregular sampling

Member Function Documentation

void setDistribution ( CacheFileDistribution  distribution)

Set up the cache format when reading the description file.

Set the distribution.

Parameters
[in]distributionthe distribution to set
Examples:
XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.
void setTimePerFrame ( const MTime timePerFrame)

Set the time per frame.

Parameters
[in]timePerFramethe time per frame to set
Examples:
XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.
void addDescriptionInfo ( const MString info)

Add a descriptive string.

Parameters
[in]infothe string to add
Examples:
XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.
unsigned int addChannel ( const MString channelName,
const MString interpretation,
CacheDataType  dataType,
CacheSamplingType  samplingType,
const MTime samplingRate,
const MTime startTime,
const MTime endTime,
MStatus status = NULL 
)

Add a channel.

Parameters
[in]channelNamethe new channel's name
[in]interpretationthe new channel's interpretation
[in]dataTypethe new channel's data type
[in]samplingTypethe new channel's sampling type
[in]samplingRatethe new channel's sampling rate
[in]startTimethe new channel's start time
[in]endTimethe new channel's end time
[out]statusthe return status
Returns
The index of the added channel.
Status Codes:
  • MS::kSuccess if the channel was successfully added
  • MS::kFailure otherwise
Examples:
XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.

Get information about the format in order to write the description file.

Get the distribution.

Returns
the distribution value
Examples:
XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.
MTime getTimePerFrame ( ) const

Get the time per frame.

Returns
the time per frame
Examples:
XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.
void getStartAndEndTimes ( MTime startTime,
MTime endTime 
) const

Get the start and end times.

Parameters
[out]startTimethe start time
[out]endTimethe end time
Examples:
XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.
void getDescriptionInfo ( MStringArray info) const

This method is not available in Python.

Get the descriptive strings.

Parameters
[out]infothe array of descriptive strings
Examples:
XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.
MStringArray getDescriptionInfo ( ) const

Get the descriptive strings.

Returns
the array of descriptive strings
unsigned int getNumChannels ( ) const

Get the number of channels.

Returns
the number of channels
Examples:
XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.
MString getChannelName ( unsigned int  channelIndex) const

Get a channel's name.

Parameters
[in]channelIndexthe index of the channel to be queried
Returns
the channel's name
Examples:
XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.
MString getChannelInterpretation ( unsigned int  channelIndex) const

Get a channel's intepretation.

Parameters
[in]channelIndexthe index of the channel to be queried
Returns
the channel's intepretation
Examples:
XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.
MCacheFormatDescription::CacheDataType getChannelDataType ( unsigned int  channelIndex) const

Get a channel's data type.

Parameters
[in]channelIndexthe index of the channel to be queried
Returns
the channel's data type
Examples:
XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.
MCacheFormatDescription::CacheSamplingType getChannelSamplingType ( unsigned int  channelIndex) const

Get a channel's sampling type.

Parameters
[in]channelIndexthe index of the channel to be queried
Returns
the channel's sampling type
Examples:
XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.
MTime getChannelSamplingRate ( unsigned int  channelIndex) const

Get a channel's sampling rate.

Parameters
[in]channelIndexthe index of the channel to be queried
Returns
the channel's sampling rate
Examples:
XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.
MTime getChannelStartTime ( unsigned int  channelIndex) const

Get a channel's start time.

Parameters
[in]channelIndexthe index of the channel to be queried
Returns
the channel's start time
Examples:
XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.
MTime getChannelEndTime ( unsigned int  channelIndex) const

Get a channel's end time.

Parameters
[in]channelIndexthe index of the channel to be queried
Returns
the channel's end time
Examples:
XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.
const char * className ( )
static

Returns the name of this class.

Returns
The name of this class.

The documentation for this class was generated from the following files: