Go to: Synopsis. Return value. Keywords.
Flags. Python
examples.
diskCache([append=boolean], [cacheType=string], [close=string], [closeAll=boolean], [delete=string], [deleteAll=boolean], [empty=string], [emptyAll=boolean], [enabledCachesOnly=boolean],
[endTime=time], [frameRangeType=string], [overSample=boolean], [samplingRate=int], [startTime=time], [tempDir=boolean])
Note: Strings representing object names and
arguments must be separated by commas. This is not depicted in the
synopsis.
diskCache is NOT undoable, queryable, and NOT
editable.
Command to create, clear, or close disk cache(s).
None
In query mode, return type is based on queried flag.
disk, cache
append, cacheType, close,
closeAll, delete, deleteAll,
empty, emptyAll, enabledCachesOnly, endTime, frameRangeType, overSample, samplingRate, startTime, tempDir
Long name (short name) |
Argument types |
Properties |
frameRangeType(frt) |
string |
  |
|
Specifies the type of frame range to use, namely "Render
Globals", "Time Slider", and "Start/End". In the case of "Time
Slider", startFrame and endFrame need to be specified. (This flag
is now obsolete. Please use the -startTime and -endTime flags to
specify the frame range explicitly.) |
|
startTime(st) |
time |
  |
|
Specifies the start frame of the cache range. |
|
endTime(et) |
time |
  |
|
Specifies the end frame of the cache range. |
|
samplingRate(sr) |
int |
  |
|
Specifies how frequently to sample relative to each frame. When
over-sampling (-overSample has been specified), this parameter
determines how many times per frame the runup will be evaluated.
When under-sampling (the default, when -overSample has not been
specified), the runup will evaluate only once per sr frames,
where sr is the value specified to this flag. |
|
enabledCachesOnly(eco) |
boolean |
  |
|
When present, this flag restricts the -ea/emptyAll, so that
only "enabled" disk caches (i.e., disk cache nodes with the
".enable" attribute set to "true") are affected. |
|
emptyAll(ea) |
boolean |
  |
|
Clear the content of all disk caches. If -eco/enabledCachesOnly
is "true" only enabled disk cache nodes are affected. |
|
empty(e) |
string |
  |
|
Clear the content of the disk cache with the given disk cache
node name. If -eco/enabledCachesOnly is "true" only enabled disk
cache nodes are affected. |
|
deleteAll(da) |
boolean |
  |
|
Delete all disk cache files. If -eco/enabledCachesOnly is
"true" only enabled disk cache nodes are affected. |
|
delete(d) |
string |
  |
|
Delete the cache given the disk cache node name. If
-eco/enabledCachesOnly is "true" only enabled disk cache nodes are
affected. |
|
closeAll(ca) |
boolean |
  |
|
Close all disk cache files. If -eco/enabledCachesOnly is "true"
only enabled disk cache nodes are affected. |
|
close(c) |
string |
  |
|
Close the cache given the disk cache node name. If
-eco/enabledCachesOnly is "true" only enabled disk cache nodes are
affected. |
|
append(a) |
boolean |
  |
|
Append at the end and not to flush the existing cache |
|
overSample(os) |
boolean |
  |
|
Over sample if true. Otherwise, under sample. |
|
cacheType(ct) |
string |
  |
|
Specifies the type of cache to overwrite. "mcfp" for particle
playback cache, "mcfi" for particle initial cache. "mcj" for jiggle
cache. This option is only activated during the cache
creation. |
|
tempDir(tmp) |
boolean |
  |
|
Query-only flag for the location of temporary diskCache
files. |
|
Flag can appear in Create mode of
command |
Flag can appear in Edit mode of command |
Flag can appear in Query mode of command |
Flag can have multiple arguments, passed
either as a tuple or a list. |
import maya.cmds as cmds
# Explicitly specify the settings for disk cache
# creation: the start time to 3 and the end time to 10.
cmds.diskCache( startTime=3, endTime=10 )
# Specify to use over sampling and with sampling
# rate set to 2, sampling twice for each frame.
cmds.diskCache( overSample=True, samplingRate=2 )
# Delete all caches
cmds.diskCache( deleteAll=True )
# Clear the cache content for diskCache3's cache.
cmds.diskCache( empty='diskCache3' )
# Close all the disk caches.
cmds.diskCache( emptyAll=True )