Go to:
Return value. Related commands. Flags. Examples.
Synopsis
setParticleAttr -at/-attribute STRING [-fv/floatValue FLOAT] [-vv/vectorValue FLOAT FLOAT FLOAT] [-rf/randomFloat FLOAT] [-rv/randomVector FLOAT FLOAT FLOAT] [-r/relative BOOLEAN] [particleObjectName or component]
This action will set the value of the chosen attribute for every
particle or selected component in the selected or passed particle object.
Components should not be passed to the command line.
For setting the values of components, the components must be
selected and only the particle object's names should be passed to
this action.
If the attribute is a vector attribute and the -vv flag is passed,
then the three floats passed will be used to set the values. If
the attribute is a vector and the -fv flag is pass and the -vv flag
is not passed, then the float will be repeated for each of the
X, Y, and Z values of the attribute. Similarly, if the attribute is
a float attribute and a vector value is passed, then the length of
the vector passed will be used for the value.
Note: The attribute passed must be a Per-Particle attribute.
Return value
NONE
Related commands
particle, getParticleAttrFlags
attribute, floatValue, object, randomFloat, randomVector, relative, vectorValue
Long name (short name) | [argument types] | Properties |
---|
-attribute
(-at)
| STRING | |
|
Tells the action which attribute you want to set
|
|
-floatValue
(-fv)
| FLOAT | |
|
Tells what you want the value to be set to of a float attribute
|
|
-vectorValue
(-vv)
| FLOAT FLOAT FLOAT | |
|
Tells what you want the value to be set to of a vector
attribute
|
|
-randomFloat
(-rf)
| FLOAT | |
|
Tells the command to add a random value from -FLOAT to +FLOAT to
the results of each particle. The default is 0.0.
|
|
-randomVector
(-rv)
| FLOAT1 FLOAT2 FLOAT3 | |
|
Tells the command to add a random value from <-FLOAT1,-FLOAT2,-FLOAT3> to <FLOAT1,FLOAT2,FLOAT3> to
the results of each particle. The default is < 0, 0, 0 >.
|
|
-relative
(-r)
| BOOLEAN | |
|
If this is set to TRUE (the default is FALSE), then the float or vector value will be added to the current value
for each particle.
|
|
-object
(-o)
| STRING | |
|
If this flag is passed and the STRING is the name of a particle object's transform or shape,
then ONLY that object will be edited, ignoring the selection list or command line, and
ALL of its particles' values will be changed for the specified attribute.
|
|
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
|
Examples
setParticleAttr -at velocity -vv 1 2 3 particle1;
// This will set the velocity of all of the particles in particle1
// to << 1, 2, 3 >>.
select particleShape1.pt[0:7] particleShape1.pt[11];
setParticleAttr -vv 1 2 3 -at velocity; or setParticleAttr -at velocity particleShape1;
// This will set the velocity of particles 0-7 and 11 of
// particleShape1 to << 1, 2, 3 >>. The rest of the particles are
// not changed.