pymel.core.nodetypes.CacheFile

Inheritance diagram of CacheFile

class CacheFile(*args, **kwargs)

class counterpart of mel function cacheFile

Creates one or more cache files on disk to store attribute data for a span of frames. The caches can be created for either points on a geometry (using the pts/points flag) or for vectorArray output data (using the oa/outAttr flag). When the ia/inAttr flag is used, connects a cacheFile node that associates the data file on disk with the attribute. Frames can be replaced/appended to an existing cache with the rcf/replaceCachedFrame and apf/appendFrame flag. Replaced frames are never deleted. They are stored in the same directory as the original cache files with the name provided by the f/fileName flag. If no file name is provided, the cacheFile name is prefixed with “backup” followed by a unique number. Single file caches are backed up in their entirety. To revert to an older version, simply attach to this cache. One file per frame caches only backup the description file and the frames that were replaced. To recover these types of caches, the user must rename these files to the original name.

getCacheFormat(**kwargs)

Cache file format, default is Maya’s .mcc format, but others available via pluginFlag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.cacheFile

getCacheInfo(**kwargs)

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.

Derived from mel command maya.cmds.cacheFile

getCacheableAttrs(**kwargs)

Returns the list of cacheable attributes defined on the accompanying cache node. This argument requires the use of the cacheableNode flag.

Derived from mel command maya.cmds.cacheFile

getChannelIndex(**kwargs)

A query-only flag which returns the channel index for the selected geometry for the cacheFile node specified using the cacheFileNode flag.

Derived from mel command maya.cmds.cacheFile

getChannelName(**kwargs)

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.

Derived from mel command maya.cmds.cacheFile

getDataSize(**kwargs)

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, and outAttr flags.

Derived from mel command maya.cmds.cacheFile

getDescriptionFileName(**kwargs)

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.

Derived from mel command maya.cmds.cacheFile

getDirectory(**kwargs)

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.

Derived from mel command maya.cmds.cacheFile

getFileName(**kwargs)

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.

Derived from mel command maya.cmds.cacheFile

getGeometry(**kwargs)

A query flag which returns the geometry controlled by the specified cache node

Derived from mel command maya.cmds.cacheFile

getPointCount(**kwargs)

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.

Derived from mel command maya.cmds.cacheFile

getRunupFrames(**kwargs)

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.

Derived from mel command maya.cmds.cacheFile

getSampleMultiplier(**kwargs)

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.

Derived from mel command maya.cmds.cacheFile

getSimulationRate(**kwargs)

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.

Derived from mel command maya.cmds.cacheFile

getStaticCache(**kwargs)

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.

Derived from mel command maya.cmds.cacheFile

replaceWithoutSimulating(val=True, **kwargs)

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.

Derived from mel command maya.cmds.cacheFile

setRunupFrames(val=True, **kwargs)

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.

Derived from mel command maya.cmds.cacheFile

setSampleMultiplier(val=True, **kwargs)

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.

Derived from mel command maya.cmds.cacheFile

setSimulationRate(val=True, **kwargs)

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.

Derived from mel command maya.cmds.cacheFile

Previous topic

pymel.core.nodetypes.CacheBlend

Next topic

pymel.core.nodetypes.Camera

Core

Core Modules

Other Modules

This Page