relative path name for syflex cache


hi there,

is it possible to have a realative path name for syflex cache?

when I use the browse button besides the field where i have to enter the path and select a destination, syflex creates an absolut path name like "c:\ProjectXYZ\syflex\cache

but what i want is to have a relative path as if i set my project to “c:\ProjectXYZ” and in the cloth solver node i just enter “syflex\cache” as my path name.



Why don’t you just try with simple anim? Tho’ I doubt it would work…



of course i tried everything with a simple anim, before i decided to start a thread on this.

any helpful advice, anyone?


no, but you could make a script to set it relative to the filename / or project.

I have used this one. (I haven’t gotten around to replaceing “system mkdir” with mel “sysFile”)

But what it does is make a dir “/syCacheFiles/” in your scenes dir, and makes another dir below named
the same as your scene file to put the syflex caches. I usually run this in batch mode just before
I start a solve.

global proc setSyflexCache(){

 int $DEBUG= 0;

 string $scenePathName = `file -q -sn`;
 string $sceneBaseName = `file -q -ns`;

 string $buffer[];
 $numTokens = `tokenize  $scenePathName "." $buffer`;
 string $filePathPre = $buffer[$numTokens - 2];
 string $filePath = `substitute $sceneBaseName $filePathPre ("/syCacheFiles/"+$sceneBaseName+"/")`;

 string $filePathDir = `substitute $sceneBaseName $filePathPre ("/syCacheFiles/")`;

 string $cmd = ("mkdir "+$filePathDir+";");
 catch ( `system($cmd)`);

 string $listShape[] = `ls -s "syCloth*Shape"`;
 string $listSySolvers[]= `ls -typ syCloth`;
         $filePath = ("/tmp/"+$sceneBaseName+"/");
         string $cmd = ("mkdir "+$filePath+";");
         catch ( `system($cmd)`);
         string $cmd = ("mkdir "+$filePath+";");
         catch ( `system($cmd)`);

     //set solver cache
     for($item in $listSySolvers){

         setAttr -type "string" ($item+".cacheName") ($filePath+$item+"_");



This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.