Go to: Synopsis. Return value. Keywords. Flags. MEL examples.

Synopsis

cacheFileMerge [-endTime time] [-geometry] [-startTime time]

cacheFileMerge is undoable, queryable, and editable.

If selected/specified caches can be successfully merged, will return the start/end frames of the new cache followed by the start/end frames of any gaps in the merged cache for which no data should be written to file. In query mode, will return the names of geometry associated with the specified cache file nodes.

Return value

float[]The start and end times of merged cache followed by start/end of any gaps
string[]Names of geometry associated with specified cache in query mode.

In query mode, return type is based on queried flag.

Keywords

cache, file, merge, disk

Flags

endTime, geometry, startTime
Long name (short name) Argument types Properties
-geometry(-g) query
Query-only flag used to find the geometry nodes associated with the specified cache files.
-startTime(-st) time create
Specifies the start frame of the merge range. If not specified, will figure out range from the times of the caches being merged.
-endTime(-et) time create
Specifies the end frame of the merge range. If not specified, will figure out range from times of caches being merged.

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 be used more than once in a command.

MEL examples

// Find associated geometry nodes
//
string $geom[] = `cacheFileMerge -q -geometry cache1 cache2`;
// Validate merging of caches and find out start/end times
// This will give a warning if there is a gap letting you know that
// simulation data will fill the gap.
//
string $startEndTimes[] = `cacheFileMerge cache1 cache2`;
// Result: { 0, 20, 5, 10 }
int $start = $startEndTimes[0];
int $end = $startEndTimes[1];
int $gapStart = $startEndTimes[2];
int $gapEnd = $startEndTimes[3];
// Create a new merged cache, using simulation data to fill in
// any gaps between cache1 and cache2.
//
string $cacheFiles[] = `cacheFile -fileName "mergedCache" -startTime $start -endTime $end -points $geom[0]`;
string $switch = createHistorySwitch("pPlane1", false);
cacheFile -attachFile -f $cacheFiles[0] -ia ($switch+".inp[0]");
setAttr ($switch+".playFromCache") true;
// Alternatively, can use append to make sure that we interpolate
// for the frames in the gap between cache1 and cache2.
//
string $cacheFiles[] = `cacheFile -fileName "mergedCache" -startTime $start -endTime $gapStart -points $geom[0]`;
string $switch = createHistorySwitch("pPlane1", false);
cacheFile -attachFile -f $cacheFiles[0] -ia ($switch+".inp[0]");
setAttr ($switch+".playFromCache") true;
cacheFile -replaceCachedFrame -startTime $gapEnd -endTime $end -points  $geom[0];