query cachefile name

query cachefile name

creativeplanet
Contributor Contributor
827 Views
5 Replies
Message 1 of 6

query cachefile name

creativeplanet
Contributor
Contributor

Hi,

 

a simple question - i'm just starting.

I need to get the name of the cacheFile associated with the selected object to be able to modify its parameters. I have an object called let's say Object and its cachFile is called ObejctCache1. how to query that name ? 

 

 

string $sel[] = `ls -sl`;
string $obj;
string $cache;

for ($obj in $sel)
{

$cache = ....($obj->cacheFile->filename)
setAttr ($cache +".oscillate") 1;


}

 

thanks!

0 Likes
Accepted solutions (1)
828 Views
5 Replies
Replies (5)
Message 2 of 6

rajasekaransurjen
Collaborator
Collaborator

Hi,

Try this....

ls -type cacheFile;

This will list all cache nodes in the scene.

 

0 Likes
Message 3 of 6

creativeplanet
Contributor
Contributor

Hello,

 

Thanks for your help. Unfortunately it doesn't solve our problem. I need to get the name of the cacheFile for a given selected object. We have multiple objects in a scene and multiple cache files. As you see in the script I would like to get the name of the cache file associated with selected object.

 

Thanks

 

Maciej

0 Likes
Message 4 of 6

rajasekaransurjen
Collaborator
Collaborator
Accepted solution

OK.....

Try this......

string $rsSl[] = `ls -sl`;
for($i=0;$i<size($rsSl);$i++)
{
    string $rsLstHst[] = `listHistory $rsSl[$i]`;
    select $rsLstHst;
    string $rsSlObjCache[] = `ls -type cacheFile`;
    print $rsSlObjCache;
}
0 Likes
Message 5 of 6

creativeplanet
Contributor
Contributor

Thank you.

0 Likes
Message 6 of 6

rajasekaransurjen
Collaborator
Collaborator

You are welcome.

0 Likes