Go to: Synopsis. Return value. MEL examples.
nParticle
selectionItem
nParticle is undoable, queryable, and editable.
The nParticle command creates a new nParticle object from a list of world space points. If an nParticle 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.string | The name of the nParticle object created |
In query mode, return type is based on queried flag.
// Creates a particle object with four particles nParticle -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 nParticle -attribute age -id 5 -q nParticle1; // Returns the velocity of the 7th particle in the currently selected // particle object nParticle -attribute velocity -order 7 -q; // Edits the velocity of the 7th particle in the currently selected // particle object to be 0.0, 1.0, 0.0 nParticle -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 nParticle -e -attribute mass -id 3 -fv 0.7 nParticle1;