Go to: Synopsis. Return value. Keywords. Flags. Python examples.

Synopsis

particleFill([closePacking=boolean], [doubleWalled=boolean], [maxX=float], [maxY=float], [maxZ=float], [minX=float], [minY=float], [minZ=float], [particleDensity=float], [resolution=int])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

particleFill is NOT undoable, NOT queryable, and NOT editable.

This command generates an nParticle system that fills the selected object with a grid of particles.

Return value

None

Keywords

particle

Flags

closePacking, doubleWalled, maxX, maxY, maxZ, minX, minY, minZ, particleDensity, resolution
Long name (short name) Argument types Properties
resolution(rs) int create
This determines the total number of particles generated. It represent the resolution along the largest axis of the object's bounding box. For a cube shape the total potential particles will be the cube of the resolution. For other shapes it will be less. The default value for this flag is 10, so 1000 particles could be generated for a cube shape.
maxX(mxx) float create
The fill max bounds of the particles in X relative to the X bounds of the object. A value of zero is totally empty and one is totally full. The default value is 1, or fully filled.
maxY(mxy) float create
The fill max bounds of the particles in Y relative to the Y bounds of the object. A value of zero is totally empty and one is totally full. The default value is 1, or fully filled.
maxZ(mxz) float create
The fill max bounds of the particles in Z relative to the Z bounds of the object. A value of zero is totally empty and one is totally full. The default value is 1, or fully filled.
minX(mnx) float create
The fill lower bounds of the particles in X relative to the X bounds of the object. A value of zero is totally full and one is totally empty. The default value is 0, or fully filled.
minY(mny) float create
The fill lower bounds of the particles in Y relative to the Y bounds of the object. A value of zero is totally full and one is totally empty. The default value is 0, or fully filled.
minZ(mnz) float create
The fill lower bounds of the particles in Z relative to the Z bounds of the object. A value of zero is totally full and one is totally empty. The default value is 0, or fully filled.
doubleWalled(dw) boolean create
This flag should be used if the thickness of the object to fill has been modeled( for example a mug ). Otherwise the particles will be created inside the wall. Note that doubleWalled will not handle some cases very well. For example a double walled donut shape may get the center region of the donut filled. In cases like this it may be better to make the internal wall a separate mesh then fill that without using doubleWalled.
particleDensity(pd) float create
This controls the size of the particles. At a value of 1.0 the particle size will exactly match the grid spacing determined by the resolution parameter and the object bounds. Particles which overlap the surface will be rejected even if the center of the particle is inside.
closePacking(cp) boolean create
If this is on then the particles are positioned as closely as possible in a hexagonal close packing arrangement. Otherwise particles are packed in a uniform grid lattice.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

# create a poly torus with particles filling interior
cmds.polyTorus()
cmds.particleFill()