This interface provides access to the liquid or foam particle cache for MaxLiquidSolver objects. Available in 3ds Max 2018.3 and later.
Properties:
ParticleCache.baseFilename : string : Read
Gets the base path and filename for the cache files. For example, "C:\Program Files\3ds Max 2019\SimCache\Untitled\Liquid001\Solver01\voxel_liquid\voxel_liquid_particle". This path is constructed from the MaxLiquid.cacheOutputFilePattern
property. Cache files are stored in this location with a suffix of <frame number>.bif
. For example "voxel_liquid_particle.0001.bif".
ParticleCache.numDigits : integer : Read
Gets the number of digits used for the frame portion of the cache file name.
ParticleCache.cacheType : enum : Read
cacheType enums: {#unknown|#liquid|#smoke|#foam|#mesh}
Returns the cache object type.
ParticleCache.startFrame : integer : Read
Returns the frame number the cache starts at.
ParticleCache.endFrame : integer : Read
Returns the frame number the cache ends at.
ParticleCache.colorChannelname : string : Read|Write
ParticleCache.sizeChannelName : string : Read|Write
ParticleCache.opacityChannelname : string : Read|Write
Gets or sets the color, size, or opacity channel names. The string is empty when the channel mode is "Static". This corresponds to the <MaxLiquidSolver>.colorChannelMode
, .sizeChannelMode
, and .opacityChannelMode
properties.
Methods:
<string>ParticleCache.GetMainName()
Returns the name of the solver the particle cache is associated with.
<integer>ParticleCache.GetNumFrames()
Returns the number of frames in the cache.
<integer>ParticleCache.GetNumParticles <integer>frame
Returns the number of particles in the cache file for the specified frame number, or -1 if the specified frame does not exist.
<point3 by value>ParticleCache.GetParticlePos <integer>frame <index>particleIndex
Returns the position of the particle at the specified index at the specified frame, or [0,0,0] if the frame or index does not exist.
<box3>ParticleCache.GetBoundingBox <integer>frame
Returns the bounding box of all the particles at the specified frame.
<void>ParticleCache.Clear()
Clears the particle cache from memory. Note that this does not delete the cache files on disk.
<integer>ParticleCache.IsCached <integer>frame
Returns true if a cache exists for the specified fame.