MaxLiquid : GeometryClass

MaxLiquid - superclass: GeometryClass; super-superclass:node - 28:0 - classID: #(712128612L, 2137014116L)

Available in 3ds Max 2018.3 and higher. The liquid class contains the set up parameters for a fluid simulation, including references to other objects, such as colliders and kill planes, that interact with the liquid in the simulation.

Constructor

MaxLiquid...

Ecample

-- Max fluid scene set up
resetmaxFile #noPrompt
p = plane()

b = box width:70 length:70 height:20
convertto b editable_poly

subobjectlevel = 4
b.SetSelection #Face #{2}
b.delete #face
addmodifier b (shell outerAmount:3.0)

liquid = maxLiquid pos:[0,0,50]
-- don't do this:
-- append liquid.collider_Meshes b
-- append liquid.killplanes p
liquid.AddCollider b
liquid.AddKillPlane p

-- create a new solver for the liquid and set the Base Voxel size
liquid.CreateSolver 1
solver = liquid.solvers[1]
solver.baseVoxelSize = 4.0

-- Turn on override for the first collider:
solver.colliderConversionOverrideTab[1] = true
-- Set thickness for the collider
solver.colliderConversionOverrideThicknessTab[1] = 5.0
`



**Properties:**

.accelerator_Meshes ArrayParameter default: #() -- node array; SubAnim


Reserved for future use.

.cacheOutputFilePattern String default: "\SimCache<ObjectName><SolverName>" -- string


Reserved for future use.

.collider_Meshes ArrayParameter default: #() -- node array; SubAnim


An array of scene nodes that act as colliders with the liquid in the simulation.

**Note**: this array should not be directly manipulated, it is for reading only. To work with collider meshes, use the `Add/Get/Delete` methods for Colliders (see below).

.emitter_Meshes ArrayParameter default: #() -- node array; SubAnim


An array of scene nodes that act as liquid emitters. This array is only used when the emitter icon type is "custom".

**Note**: this array should not be directly manipulated, it is for reading only. To work with emitter meshes, use the `Add/Get/Delete` methods for Emitters (see below).

.emitterType Integer default: 0 -- integer


The type of emitter icon, where:

- 0 = sphere
- 1 = box
- 2 = plane
- 3 = custom – the nodes in the **emitter_Meshes** array are used as emitters.

.emitterHeight Float default: 5.0 -- animatable; float .emitterLength Float default: 5.0 -- animatable; float .emitterWidth Float default: 5.0 -- animatable; float


The height, length, and width of the emitter, when it is a box. When it is a sphere, the **emitterLength** is the radius. When the emitter is a plane, only the width and length parameters are used.

.exportPRTFiles BooleanClass default: false -- Boolean


Indicates whether to export voxels as PRT files when running the solve.

.field_Meshes ArrayParameter default: #() -- node array; SubAnim


An array of scene nodes that act as motion fields.

**Note**: this array should not be directly manipulated, it is for reading only. To work with motion fields, use the `Add/Get/Delete` methods for motion fields (see below).

.foammask_Meshes ArrayParameter default: #() -- node array; SubAnim


An array of scene nodes that act as foam masks.

**Note**: this array should not be directly manipulated, it is for reading only. To work with foam masks, use the `Add/Get/Delete` methods for Foam Masks (see below).

.guide_Meshes ArrayParameter default: #() -- node array; SubAnim


An array of scene nodes that act as guide meshes.

**Note**: this array should not be directly manipulated, it is for reading only. To work with guide meshes, use the `Add/Get/Delete` methods for Guide Meshes (see below).

.guideEmitter_Meshes ArrayParameter default: #() -- node array; SubAnim


An array of scene nodes that act as Guide Emitters.

**Note**: this array should not be directly manipulated, it is for reading only. To work with guide emitter meshes, use the `Add/Get/Delete` methods for Guide Emitters (see below).

.iconSize Float default: 10.0 -- float


The size of the liquid icon in the viewport. Note that this is always in inches, regardless of the scene units.

.killplanes ArrayParameter default: #() -- node array; SubAnim


An array of scene nodes that act as kill planes in the simulation.

**Note**: this array should not be directly manipulated, it is for reading only. To work with kill planes, use the `Add/Get/Delete` methods for Kill Planes (see below).

.killVolumeNode UndefinedClass default: undefined -- node


Reserved for future use

.lastSelectedSolverIndex Integer default: 1 -- integer


Contains the index in the solvers array of the last solve selected by the user.

.maxScratchCacheRAM Float default: 1.0 -- float


Reserved for future use.

.renderSolveIndex Integer default: 1 -- integer


Contains the index of the solver in the solver list which was last rendered.

.renderSolveLock BooleanClass default: false -- Boolean


Gets or sets the state of the render lock button, where true indicates that the selected solve is locked.

.rootSimDirectory String default: "c:\MaxFluidSim" -- string


Contains the root directory in which cache files are saved.

.scratchCache String default: "c:\MaxFluidScratchCache" -- string


Reserved for future use.

.showVoxelGrid BooleanClass default: true -- Boolean


Indicates whether to show a visual representation of the voxel size in the viewport.

.solvers ArrayParameter default: #() -- maxObject array; SubAnim


An array of solver objects for the liquid.

.useProjectFolders BooleanClass default: false -- Boolean


Indicates whether to use the Max project folder instead of the **rootSimDirectory** to store solver cache files.

## MaxLiquid Interfaces

**Interface: MaxFluidLiquidObject**

**Properties:**

**Methods:**
<boolean>CreateSolver <&index>solverIndex
   solverIndex is Out parameter

Creates a new solver in the liquid’s solvers array, returning the index of the newly created solve.
<boolean>CloneSolver <index>index <&string>cloneName <&index>cloneIndex
   cloneName is Out parameter
   cloneIndex is Out parameter

Creates a new, cloned copy of the solver specified by the index, returning the new name and index.
<boolean>DeleteSolver <index>index

Deletes the solver specified by the index.
<integer>NumberSolvers()

Returns the number of solvers in the solvers array.
<index>AddEmitter <node>node
<integer>GetNumberEmitters()
<node>GetEmitter <index>index
<boolean>DeleteEmitter <index>index

Manipulates the collection of emitters held in the liquid's `emitter_Meshes` array.
<index>AddCollider <node>node
<integer>GetNumberColliders()
<node>GetCollider <index>index
<boolean>DeleteCollider <index>index

Manipulates the collection of colliders held in the liquid's `collider_Meshes` array.
<index>AddKillPlane <node>node
<integer>GetNumberKillPlanes()
<node>GetKillPlane <index>index
<boolean>DeleteKillPlane <index>index

Manipulates the collection of kill planes held in the liquid's `killplanes` array.
<index>AddFoamMask <node>node
<integer>GetNumberFoamMasks()
<node>GetFoamMask <index>index
<boolean>DeleteFoamMask <index>index

Manipulates the collection of foam masks held in the liquid's `foammask_Meshes` array.
<index>AddGuideEmitter <node>node
<integer>GetNumberGuideEmitters()
<node>GetGuideEmitter <index>index
<boolean>DeleteGuideEmitter <index>index

Manipulates the collection of guide emitters held in the liquid's `guideEmitter_Meshes` array.
<index>AddMotionField <node>node
<integer>GetNumberMotionFields()
<node>GetMotionField <index>index
<boolean>DeleteMotionField <index>index

Manipulates the collection of motion fields held in the liquid's `field_Meshes` array.

**Actions:**