PDA

View Full Version : Point Cache and cache file name


cleobule
11-03-2009, 10:47 AM
Hi !

I am triing automatically apply & calculate a pointcache on all my flex modifiers.

I also want the file of each pointcache to have a different names because I have got a lot of different scenes and do not want them to erase each others.

My problem is that when i change the name of the pointcache file with the script below, the pointcache is in error when I record. "Error Record cache file".

on BT_Calculate pressed do
(

NameScene = substituteString maxfilename ".max" "_"
PointCacheName = NameScene + CHARACTER.name + ".xml"
CHARACTER.modifiers[#Point_Cache].filename = PointCacheName
....
)
Do I have to use the method "new" which is in the pointcache UI ? But I do not see any reference of it in the maxscript doc.

Does anyone have an idea ?
thank you in advance.
Daniel

Gravey
11-03-2009, 01:03 PM
you have to specify the name of the file AND its path as a string for the filename property
also in your code you can replace:
NameScene = substituteString maxfilename ".max" "_"
with:
NameScene = getFilenameFile maxfilename + "_"

so your code would be like this: outputPath = @"C:\point_cache\" -- this should be changed to your chosen output path
NameScene = getFilenameFile maxfilename + "_"
PointCacheName = outputPath + NameScene + CHARACTER.name + ".xml"
CHARACTER.modifiers[#Point_Cache].filename = PointCacheName

Polimeno
11-03-2009, 10:10 PM
Joe Gunn (http://www.joegunn3d.com/)īs cache bar:
Tutorial (http://www.joegunn3d.com/Tuts/Cache_Bar.htm) / File (http://www.joegunn3d.com/Cache_Bar_V1_2.rar)

hope it helps.

cleobule
11-04-2009, 09:27 PM
Thanks you very much guys ! You saved me hours of nervous trial and error and error and error ...

CGTalk Moderation
11-04-2009, 09:27 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.