Go to: Synopsis. Return value. Related. Flags. MEL examples.
getParticleAttr [-array boolean] [-attribute string] [-object string]
selectionItem
getParticleAttr is undoable, NOT queryable, and NOT editable.
This action will return either an array of values, or the average value and maximum offset, for a specied per-particle attribute of a particle object or component. If a particle component is specified on the command line, values are returned for that component only. If an object name is given instead, values are returned for all particles in that object. If no object name is passed, but a particle object or component is selected, values are returned for the selection.If you list components, they must all be from the same particle object; the action ignores all objects after the first. Likewise if you list more than one object, the actiion will return values only for the first one.
| float[] |
| Long name (short name) | Argument types | Properties | ||
|---|---|---|---|---|
-array(-a)
|
boolean
|
|
||
|
||||
-attribute(-at)
|
string
|
|
||
|
||||
-object(-o)
|
string
|
|
||
|
||||
getParticleAttr -at velocity particle1; // This will return the average velocity for the entire particle // object as well as the maximum offset from the average. getParticleAttr -at velocity particleShape1.pt[0:7] particleShape1.pt[11]; // This will return the average velocity for particles 0-7 and 11 // as well as the maximum offset from the average. getParticleAttr -at position -array true particleShape1.pt[0:7] particleShape1.pt[11]; // This will return an array of 27 floats containing the position // values for the nine specified particles.