cacheFile is undoable, queryable, and editable.
Creates one or more cache files on disk to store attribute data for a span of
frames. The caches can be created for points/normals on a geometry (using
the pts/points or pan/pointsAndNormals flag), for vectorArray output data
(using the oa/outAttr flag), or for additional node specific data (using the
cnd/cacheableNode flag for those nodes that support it).
In query mode, return type is based on queried flag.
Long name (short name) |
Argument types |
Properties |
fileName(f)
|
string
|
![create create](../gfx/create.gif)
|
|
Specifies the base file name for the cache files. If more than one object is
being cached and the format is OneFilePerFrame, each cache file will be
prefixed with this base file name. In query mode, returns the files
associated with the specified cacheFile node.
When used with rpf/replaceCachedFrame or apf/appendFrame specifies the name of the backup files.
If not specified, replaced frames will be stored with a default name.
In query mode, this flag can accept a value.
|
|
directory(dir)
|
string
|
![create create](../gfx/create.gif)
|
|
Specifies the directory where the cache files will be located. If the
directory flag is not specified, the cache files will be placed in the
project data directory.
|
|
prefix(p)
|
boolean
|
|
|
Indicates that the specified fileName should be used as a prefix for the
cacheName.
|
|
descriptionFileName(dfn)
|
boolean
|
|
|
This is a query-only flag that returns the name of the description file
for an existing cacheFile node. Or if no cacheFile node is specified, it
returns the description file name that would be created based on the other
flags specified.
|
|
startTime(st)
|
time
|
|
|
Specifies the start frame of the cache range.
|
|
endTime(et)
|
time
|
|
|
Specifies the end frame of the cache range.
|
|
simulationRate(smr)
|
time
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
Specifies the simulation rate when caches are being created. During cache
creation, the time will be advanced by the simulation rate, until the end
time of the cache is reached or surpassed. The value is given in frames.
The default value is 1 frame.
|
|
sampleMultiplier(spm)
|
int
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
Specifies the sample rate when caches are being created as a multiple of
simulation Rate. If the value is 1, then a sample will be cached everytime
the time is advanced. If the value
is 2, then every other sample will be cached, and so on. The default is 1.
|
|
runupFrames(rf)
|
int
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
Specifies the number of frames of runup to simulate ahead of the starting frame.
The value must be greater than or equal to 0. The default is 2.
|
|
points(pts)
|
string
|
![create create](../gfx/create.gif)
|
|
Specifies the name of a geometry whose points will be cached.
In query mode, this flag needs a value.
|
|
pointsAndNormals(pan)
|
string
|
![create create](../gfx/create.gif)
|
|
Specifies the name of a geometry whose points and normals will be cached.
The normals is per-vertex per-polygon. The normals cache cannot be imported
back to geometry.
This flag can only be used to export cache file. It cannot be used with
the apf/appendFrame, dcf/deleteCachedFrame and rpf/replaceCachedFrame flags.
In query mode, this flag needs a value.
|
|
worldSpace(ws)
|
boolean
|
|
|
If the points flag is used, turning on this flag will result in the world
space positions of the points being written. The expected use of this
flag is for cache export.
|
|
cacheableNode(cnd)
|
string
|
![create create](../gfx/create.gif)
|
|
Specifies the name of a cacheable node whose contents will be cached.
A cacheable node is a node that is specially designed to work with
the caching mechanism. An example of a cacheable node is a nCloth node.
In query mode, this flag needs a value.
|
|
dataSize(dsz)
|
boolean
|
|
|
This is a query-only flag that returns the size of the data being cached per frame.
This flag is to be used in conjunction with the cacheableNode, points,
pointsAndNormals and outAttr flags.
|
|
cacheFileNode(cfn)
|
string
|
![create create](../gfx/create.gif)
|
|
Specifies the name of the cache file node(s) we are appending/replacing to
if more than one cache is attached to the specified geometries.
In query mode, this flag needs a value.
|
|
singleCache(sch)
|
boolean
|
|
|
When used in conjunction with the points, pointsAndNormal or cacheableNode
flag, specifies whether multiple geometries should be put into a single
cache or to create one cache per geometry (default).
|
|
inAttr(ia)
|
string
|
![create create](../gfx/create.gif)
|
|
Specifies the name of the attribute that the cache file will drive.
This file is optional when creating cache files.
If this flag is not used during create mode, the cache files will
be created on disk, but will not be driving anything in the scene.
This flag is required when the attachFile flag is used.
|
|
outAttr(oa)
|
string
|
![create create](../gfx/create.gif)
|
|
Specifies the name of the attribute that will be cached to disk.
In query mode, this flag needs a value.
|
|
cacheableAttrs(cat)
|
string
|
|
|
Returns the list of cacheable attributes defined on the accompanying cache node.
This argument requires the use of the cacheableNode flag.
|
|
attachFile(af)
|
boolean
|
|
|
Used to indicate that rather than creating a cache file, that an
existing cache file on disk should be attached to an attribute in the scene.
The inAttr flag is used to specify the attribute.
|
|
createCacheNode(ccn)
|
boolean
|
|
|
Used to indicate that rather than creating a cache file, that a cacheFile
node should be created related to an existing cache file on disk.
|
|
channelName(cnm)
|
string
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
When attachFile is used, used to indicate the channel in the file that
should be attached to inAttr. If not specified, the first channel in
the file is used. In query mode, allows user to query the channels associated
with a description file.
|
|
creationChannelName(cch)
|
string
|
![create create](../gfx/create.gif)
|
|
When creating a new cache, this multi-use flag specifies the channels to be cached.
The names come from the cacheable channel names defined by the object being cached.
If this flag is not used when creating a cache, then all cacheable channels are cached.
|
|
channelIndex(chi)
|
boolean
|
![create create](../gfx/create.gif)
|
|
A query-only flag which returns the channel index for the selected geometry
for the cacheFile node specified using the cacheFileNode flag.
|
|
refresh(r)
|
boolean
|
|
|
When used during cache creation, forces a screen refresh during caching.
This causes the cache creation to be slower but allows you to see how the
simulation is progressing during the cache.
|
|
convertPc2(pc2)
|
boolean
|
|
|
Convert a PC2 file to the Maya cache format (true), or convert Maya cache to pc2 format (false)
|
|
pc2File(pcf)
|
string
|
|
|
Specifies the full path to the pc2 file. Must be used in conjunction with the pc2 flag.
|
|
format(fm)
|
string
|
|
|
Specifies the distribution format of the cache. Valid values are "OneFile" and "OneFilePerFrame"
|
|
appendFrame(apf)
|
boolean
|
|
|
Appends data to the cache for the times specified by the startTime and endTime flags. If no
time is provided, appends the current time. Must be used in conjunction
with the pts/points or cnd/cacheableNode flag. Any overwritten frames will not be
deleted, but renamed as specified by the f/fileName flag.
|
|
replaceCachedFrame(rcf)
|
boolean
|
|
|
Replaces cached data for the times specified by the startTime/endTime
flags. If no time is provided, replaces cache file for the current time.
Must be used in conjunction with the pts/points or cnd/cacheableNode flag.
Replaced frames will not be deleted, but renamed as specified by the
f/fileName flag.
|
|
replaceWithoutSimulating(rws)
|
boolean
|
|
|
When replacing cached frames, this flag specifies whether the replacement should
come from the cached node without simulating or from advancing time and letting
the simulation run. This flag is valid only when neither the startTime nor endTime flags
are used or when both the startTime and endTime flags specify the same time value.
|
|
deleteCachedFrame(dcf)
|
boolean
|
|
|
Deletes cached data for the times specified by the startTime/endTime flags.
If no time is provided, deletes the current frame. Must be used in conjunction
with the pts/points or cnd/cacheableNode flag. Deleted frames will not be
removed from disk, but renamed as specified by the f/fileName flag.
|
|
interpStartTime(ist)
|
time
|
|
|
Specifies the frame from which to begin linear interpolation, ending at
startTime. Must be used with the rpf/replaceCachedFrame or apf/appendFrame flags.
Interpolation is achieved by removing frames between interpStartTime and
startTime from the cache. These removed frames will will be renamed as
specified by the f/fileName flag.
|
|
interpEndTime(iet)
|
time
|
|
|
Specifies the frame until which there will be linear interpolation, beginning
at endTime. Must be used with the rpf/replaceCachedFrame or apf/appendFrame flag.
Interpolation is achieved by removing frames between endTime and
interpEndTime from the cache. Removed frames will be renamed as specified
by the f/fileName flag.
|
|
inTangent(it)
|
string
|
|
|
Specifies the in-tangent type when interpolating frames before the replaced
frame(s). Must be used with the ist/interpStartTime and iet/interpEndTime flags.
Valid values are "linear", "smooth" and "step".
|
|
outTangent(ot)
|
string
|
|
|
Specifies the out-tangent type when interpolating frames after the replaced
frame(s). Must be used with the ist/interpStartTime and iet/interpEndTime flags.
Valid values are "linear", "smooth" and "step".
|
|
noBackup(nb)
|
boolean
|
|
|
Specifies that backup files should not be created for any files that may be over-written during
append, replace or delete cache frames. Can only be used with the apf/appendFrame,
rpf/replaceCachedFrame or dcf/deleteCachedFrame flags.
|
|
geometry(gm)
|
boolean
|
|
|
A query flag which returns the geometry controlled by the specified cache node
|
|
cacheInfo(ci)
|
string
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
In create mode, used to specify a mel script returning a string array. When
creating the cache, this mel script will be executed and the returned strings
will be written to the .xml description file of the cache.
In query mode, returns descriptive info stored in the cacheFile such as
the user name, Maya scene name and maya version number.
|
|
pointCount(pc)
|
boolean
|
|
|
A query flag which returns the number of points stored in the cache file.
The channelName flag should be used to specify the channel to be queried.
|
|
doubleToFloat(dtf)
|
boolean
|
|
|
During cache creation, double data is stored in the file as floats. This helps cut down
file size.
|
|
staticCache(sc)
|
boolean
|
![create create](../gfx/create.gif)
|
|
If false, during cache creation, do not save a cache for the object if it
appears to have no animation or deformation. If true, save a cache even if
the object appears to have no animation or deformation. Default is true. In
query mode, when supplied a shape, the flag returns true if the shape appears
to have no animation or deformation.
|
|
cacheFormat(cf)
|
string
|
![create create](../gfx/create.gif)
|
|
Cache file format, default is Maya's .mcx format, but others available via plugin
|
|