pymel.core.effects.particleFill

particleFill(*args, **kwargs)

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

Flags:
Long name (short name) Argument Types Properties
closePacking (cp) bool ../../../_images/create.gif
 

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 commandFlag can have multiple arguments, passed either as a tuple or a list.

doubleWalled (dw) bool ../../../_images/create.gif
 

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.

maxX (mxx) float ../../../_images/create.gif
 

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 ../../../_images/create.gif
 

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 ../../../_images/create.gif
 

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 ../../../_images/create.gif
 

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 ../../../_images/create.gif
 

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 ../../../_images/create.gif
 

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.

particleDensity (pd) float ../../../_images/create.gif
 

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.

resolution (rs) int ../../../_images/create.gif
 

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.

Derived from mel command maya.cmds.particleFill

Example:

import pymel.core as pm

# create a poly torus with particles filling interior
pm.polyTorus()
# Result: [nt.Transform(u'pTorus1'), nt.PolyTorus(u'polyTorus1')] #
pm.particleFill()

Previous topic

pymel.core.effects.particleExists

Next topic

pymel.core.effects.particleInstancer

Core

Core Modules

Other Modules

This Page