I use blend cache alot.
I blend a little bit of one sim with alot of another, etc…
sometimes I need to add some deformer to the result of a blendCache node mesh
at this point the blendCache does not know that history, so I have to use syCacheWrite
to save the the mesh with history to a syflex cache,
I use syflex cache outside of maya , so I need to bake out the cloth mesh with history
then of course I could use that cache again with another blend cache node and mimic a syCloth mesh verts to parts of the blendcache.
here is a mel blurb that is part of my syflexBake script
string $listSyCacheNodes[]= `ls -typ syCache`;
for ($frame = ($start); $frame <= ($end + 1); $frame++){
$sy_timer = `timerX`;
currentTime -e $frame;
for($solver in $listSyCacheNodes){
//hack to get the right shape name
string $buffer[];
tokenize $solver "_" $buffer;
string $top;
if(1== `size($buffer)`){
$top=$buffer[0];
$shape= ($buffer[0]+"Shape");
}
if(2== `size($buffer)`){
$top=$buffer[1];
$shape= ($buffer[1]+"Shape");
}
if(3== `size($buffer)`){
$top=($buffer[1]+"_"+$buffer[2]);
$shape= ($top+"Shape");
}
//print $shape;
getAttr ($shape+".boundingBoxMinX");
string $ffs = `currentTime -q`;
int $ss= size($ffs);
string $pad=("000"+$ffs);
int $s = `size($pad)`;
string $padd = (substring($pad,$ss,$s));
select $top;
string $cmd = ("syCacheWrite \""+$top+"\" \""+$filePath+$solver+"_"+$padd+"\"");
print ($cmd);print "
";
eval ($cmd);
select -clear;
} int $sy_roundTime = `timerX -st $sy_timer`;
print ($sceneBaseName+": frame " + $frame + " took syflex " + ($sy_roundTime) + " seconds.
");
}