PDA

View Full Version : Query if scene has particle cache?


AtrusDni
05-31-2007, 09:41 PM
Hey guys, im writing a mel script to transfer scenes from computer to computer, and i was wondering how to know if a scene is using a particle cache, and if so how to query information from it. Basically i need to see if a particle cache exists, if so find the files associated with it, copy them to a new dir, set the particle cache to the new dir in the scene, then save the scene in the new dir.

Any ideas?

kwood
06-01-2007, 08:34 PM
I don't think when a particle gets cached it creates a new cache node, I believe it just sets a file directory inside of the dynGlobals node and then within that directory the disk cache would exist and be named according the particleShape it is associated with. So with that being said you may have to check the dynGlobals node and see if there is a cache directory setup, if there is check the directory for a file of particle cache type (.PDC); then copy the directory over with the cache files in them.

It is easier to check if a cache exists on fluids and geometry versus particles.

Check out these commands.

file, fileTest, getFileList, and cacheFile

I could be wrong about the not creating a cache node for particles, I don't have maya in front of me to try.

You could also check the current project directory for particle file types.

-Kyle

CGTalk Moderation
06-01-2007, 08:34 PM
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.