Go to: Synopsis. Return value. Keywords. Flags. MEL examples.
getFluidAttr [-attribute string] [-lowerFace] [-xIndex int] [-xvalue] [-yIndex int] [-yvalue] [-zIndex int] [-zvalue]
getFluidAttr is NOT undoable, NOT queryable, and NOT editable.
Returns values of built-in fluid attributes such as density,
velocity, etc., for individual grid cells or for all cells in the grid.
None
fluid
attribute, lowerFace, xIndex, xvalue, yIndex, yvalue, zIndex, zvalue
Long name (short name) |
Argument types |
Properties |
-attribute(-at)
|
string
|
|
|
Specifies the fluid attribute for which to display values. Valid
attributes are "force", "velocity", "density", "falloff",
"fuel", "color", and "temperature". (Note that getting force values is an
alternate way of getting velocity values at one time step.)
|
|
-lowerFace(-lf)
|
|
|
|
Only valid with "-at velocity". Since velocity values are stored on the edges
of each voxel and not at the center, using voxel based indices to set velocity
necessarily affects neighboring voxels. Use this flag to only set velocity
components on the lower left three faces of a voxel, rather than all six.
|
|
-xIndex(-xi)
|
int
|
|
|
Only return values for cells with this X index
|
|
-xvalue(-x)
|
|
|
|
Only get the first component of the vector-valued attribute specified by
the "-at/attribute" flag.
|
|
-yIndex(-yi)
|
int
|
|
|
Only return values for cells with this Y index
|
|
-yvalue(-y)
|
|
|
|
Only get the second component of the vector-valued attribute specified by
the "-at/attribute" flag.
|
|
-zIndex(-zi)
|
int
|
|
|
Only return values for cells with this Z index
|
|
-zvalue(-z)
|
|
|
|
Only get the third component of the vector-valued attribute specified by
the "-at/attribute" flag.
|
|
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.
|
// get density for entire fluid
getFluidAttr -at "density";
// get density at the cell x=1, y=2, z=3
getFluidAttr -at "density" -xi 1 -yi 2 -zi 3;
// get the velocity at the cell x=1, y=2, z=3
getFluidAttr -at "velocity" -xi 1 -yi 2 -zi 3;
// get the x-component of the velocity at cell x=1,
// y=2, z=3
getFluidAttr -xvalue -at "velocity" -xi 1 -yi 2 -zi 3;
// get the first component (red) of the rgb vector-valued
// attribute "color" at the cell x=1, y=2, z=3
getFluidAttr -xvalue -at "color" -xi 1 -yi 2 -zi 3;
// get the velocity x component the plane x=5
getFluidAttr -at "velocity" -x -xi 5;