Go to: Synopsis. Flags. Return value. Related. MEL examples.

Synopsis

particle [-attribute string] [-cache boolean] [-conserve float] [-count] [-deleteCache] [-dynamicAttrList] [-floatValue float] [-gridSpacing float] [-inherit float] [-jitterBasePoint float float float] [-jitterRadius float] [-lowerLeft float float float] [-name string] [-numJitters int] [-order int] [-particleId int] [-perParticleDouble] [-perParticleVector] [-position float float float] [-shapeName string] [-upperRight float float float] [-vectorValue float float float] objectName

particle is undoable, queryable, and editable.

The particle command creates a new particle object from a list of world space points. If a particle object is created, the command returns the names of the new particle shape and its associated particle object dependency node. If an object was queried, the results of the query are returned. Per particle attributes can be queried using the particleId or the order of the particle in the particle array. If an object was edited, nothing is returned.

Flags

attribute, cache, conserve, count, deleteCache, dynamicAttrList, floatValue, gridSpacing, inherit, jitterBasePoint, jitterRadius, lowerLeft, name, numJitters, order, particleId, perParticleDouble, perParticleVector, position, shapeName, upperRight, vectorValue
Long name (short name) [argument types] Properties
-position(-p) float float float multiuse
World-space position of each particle.
-inherit(-i) float queryedit
Inherit this fraction (0-1) of emitting object's velocity.

In query mode, this flag needs a value.

-name(-n) string queryedit
name of particle object

In query mode, this flag needs a value.

-shapeName(-sn) string queryedit
Specify the shape name used for geometry instancing. DO not confuse this with the -n flag which names the particle object.

In query mode, this flag needs a value.

-count(-ct) query
Returns the number of particles in the object.

In query mode, this flag needs a value.

-dynamicAttrList(-dal) query
Returns a list of the dynamic attributes in the object.

In query mode, this flag needs a value.

-perParticleDouble(-ppd) query
Returns a list of the per-particle double attributes, excluding initial-state, cache, and information-only attributes.

In query mode, this flag needs a value.

-perParticleVector(-ppv) query
Returns a list of the per-particle vector attributes, excluding initial-state, cache, and information-only attributes.

In query mode, this flag needs a value.

-conserve(-c) float queryedit
Conservation of momentum control (between 0 and 1). Specifies the fraction of the particle shape's existing momentum which is conserved from frame to frame. A value of 1 (the default) corresponds to true Newtonian physics, in which momentum is conserved.

In query mode, this flag needs a value.

-particleId(-id) int queryedit
Used in per particle attribute query and edit. Specifies the id of the particle whose attribute is being queried or edited. Querying the value of a per particle attribute requires the -attribute and -id or -order flags and their arguments to precede the -q flag.

In query mode, this flag needs a value.

-order(-or) int queryedit
Used in per particle attribute query and edit. Specifies the zero-based order (index) of the particle whose attribute is being queried or edited in the particle array. Querying the value of a per particle attribute requires the -attribute and -id or -order flags and their arguments to precede the -q flag.

In query mode, this flag needs a value.

-attribute(-at) string queryedit
Used in per particle attribute query and edit. Specifies the name of the attribute being queried or edited.

In query mode, this flag needs a value.

-vectorValue(-vv) float float float edit
Used only in per particle attribute edit. Specifies that the edit is of a vector attribute and must be followed by all three float values for the vector.
-floatValue(-fv) float edit
Used only in per particle attribute edit. Specifies that the edit is of a float attribute and must be followed by the new float value.
-numJitters(-nj) int
Number of jitters (instances) per particle. Multi-use.
-jitterRadius(-jr) float
Max radius from the center to place the particle instances. Multi-use.
-jitterBasePoint(-jbp) float float float
Base point (center point) for jitters. The command will create one swatch of jitters for each base point. It will pair up other flags with base points in the order they are given in the command line. If not enough instances of the other flags are availble, the last one on the line with be used for all other instances of -jpb.
-gridSpacing(-grs) float
Spacing between particles in the grid.
-lowerLeft(-ll) float float float
Lower left point of grid.
-upperRight(-ur) float float float
Upper right point of grid.
-cache(-ch) boolean
Truns caching on/off for the particle shape.
-deleteCache(-dc)
Deletes the particle shapes cache. This command is not undoable.

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 be used more than once in a command

Return value


string The name of the particle object created

Related

addPP, air, collision, connectDynamic, drag, dynExport, dynExpression, emit, emitter, event, getParticleAttr, goal, gravity, newton, radial, setParticleAttr

MEL examples

// Creates a particle object with four particles
particle -p 0 0 0 -p 3 5 6 -p 5 6 7 -p 9 9 9;

// Returns the age of the particle with id 5 in object particle1
particle -q -attribute age -id 5 particle1;

// Returns the velocity of the 7th particle in the currently selected
// particle object
particle -q -attribute velocity -order 7;

// Edits the velocity of the 7th particle in the currently selected
// particle object to be 0.0, 1.0, 0.0
particle -e -attribute velocity -order 7 -vectorValue 0.0 1.0 0.0;

// Edits the mass of the particle in "particle1" with id 3 to be 0.7
particle -e -attribute mass -id 3 -fv 0.7 particle1;