class counterpart of mel function fluidEmitter
Creates an emitter object. If object names are provided or if objects are selected, applies the emitter to the named/selected object(s)in the scene. Fluid will then be emitted from each. If no objects are named or selected, or if the -pos option is specified, creates a positional emitter. If an emitter was created, the command returns the name of the object owning the emitter, and the name of emitter shape. If an emitter was queried, the command returns the results of the query.
Provides basic information about the mapping of a fluid voxel grid into world- or object space of the fluid. Use this command to determine the center point of a voxel, or to find the voxel containing a given point, among other things.
(<function fluidVoxelInfo at 0x13906a488>, <function addCmdDocsCallback at 0x138d26320>, (‘fluidVoxelInfo’, ‘’), {})
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
checkBounds (cb) | bool | ||
|
|||
inBounds (ib) | int, int, int | ||
Are the three ints representing the x, y, z indices of a voxel within the bounds of the fluid’s voxel grid? True if yes, false if not. (For 2D fluids, pass in z=0 for the third argument. See examples.) |
|||
objectSpace (os) | bool | ||
|
|||
radius (r) | float | ||
Modifier for the -voxel flag. Returns a list of index triples identifying voxels that fall within the given radius of the point specified by the -voxel flag. Flag can have multiple arguments, passed either as a tuple or a list. |
|||
voxel (v) | float, float, float | ||
Returns array of three ints representing the x, y, z indices of the voxel within which the given point position is contained. If the checkBounds flag is on, and the point is out of bounds, we return nothing. Otherwise, even if the point is out of bounds, index values are returned. When combined with the -radius flag, returns an array of index triples representing a list of voxels within a given radius of the given point position. |
|||
voxelCenter (vc) | bool | ||
The center position of the specified voxels. Returns an array of floats (three for each of the indices in the query). (Valid only with the -xIndex, -yIndex, and -zIndex flags.) |
|||
xIndex (xi) | int | ||
|
|||
yIndex (yi) | int | ||
|
|||
zIndex (zi) | int | ||
|
Derived from mel command maya.cmds.fluidVoxelInfo
Example:
import pymel.core as pm
# fluid3D is a 10x10x5 three-dimensional fluid.
# fluid2D is a 9x9 two-dimensional fluid.
#
# Are the given indices within the bounds of the fluids?
#
pm.fluidVoxelInfo( 'fluid2D', inBounds=( 9, 9, 0) )
# Result: false
pm.fluidVoxelInfo( 'fluid2D', inBounds=( 8, 8, 0) )
# Result: true
pm.fluidVoxelInfo( 'fluid3D', inBounds=( 2, 3, 4 ) )
# Result: true
pm.fluidVoxelInfo( 'fluid3D', inBounds=( 12, 9, 2) )
# Result: false
Possible values are noneand frame.Cycling emission restarts the random number stream after a specified interval. This can either be a number of frames or a number of emitted particles. In each case the number is specified by the cycleInterval attribute. Setting cycleEmission to frameand cycleInterval to 1 will then re-start the random stream every frame. Setting cycleInterval to values greater than 1 can be used to generate cycles for games work.
Derived from mel command maya.cmds.fluidEmitter
Specifies the number of frames or particles between restarts of the random number stream. See cycleEmission. Has no effect if cycleEmission is set to None.
Derived from mel command maya.cmds.fluidEmitter
Rate at which density is emitted.
Derived from mel command maya.cmds.fluidEmitter
Returns values of built-in fluid attributes such as density, velocity, etc., for individual grid cells or for all cells in the grid.
(<function getFluidAttr at 0x13906d668>, <function addCmdDocsCallback at 0x138d26320>, (‘getFluidAttr’, ‘’), {})
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
attribute (at) | unicode | ||
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) | bool | ||
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. Flag can have multiple arguments, passed either as a tuple or a list. |
|||
xIndex (xi) | int | ||
|
|||
xvalue (x) | bool | ||
|
|||
yIndex (yi) | int | ||
|
|||
yvalue (y) | bool | ||
|
|||
zIndex (zi) | int | ||
|
|||
zvalue (z) | bool | ||
|
Derived from mel command maya.cmds.getFluidAttr
Example:
import pymel.core as pm
# get density for entire fluid
pm.getFluidAttr( at='density' )
# get density at the cell x=1, y=2, z=3
pm.getFluidAttr( at='density', xi=1, yi=2, zi=3 )
# get the velocity at the cell x=1, y=2, z=3
pm.getFluidAttr( at='velocity', xi=1, yi=2, zi=3 )
# get the x-component of the velocity at cell x=1,
# y=2, z=3
pm.getFluidAttr( xvalue=True, 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
pm.getFluidAttr( xvalue=True, at='color', xi=1, yi=2, zi=3 )
# get the velocity x component the plane x=5
pm.getFluidAttr( at='velocity', x=True, xi=5 )
Fluid Emission Dropoff in volume
Derived from mel command maya.cmds.fluidEmitter
Rate at which is emitted. Flag can have multiple arguments, passed either as a tuple or a list.
Derived from mel command maya.cmds.fluidEmitter
Rate at which density is emitted.
Derived from mel command maya.cmds.fluidEmitter
Maximum distance at which emission ends.
Derived from mel command maya.cmds.fluidEmitter
Minimum distance at which emission starts.
Derived from mel command maya.cmds.fluidEmitter
Positional emitter at world space location (x,y,z).
Derived from mel command maya.cmds.fluidEmitter
Rate at which particles emitted (can be non-integer). For point emission this is rate per point per unit time. For surface emission it is rate per square unit of area per unit time.
Derived from mel command maya.cmds.fluidEmitter
Section radius for a torus volume. Applies only to torus. Similar to the section radius in the torus modelling primitive.
Derived from mel command maya.cmds.fluidEmitter
Type of emitter. The choices are omni | dir | direction | surf | surface | curve | curv. The default is omni. The full definition of these types are: omnidirectional point emitter, directional point emitter, surface emitter, or curve emitter.
Derived from mel command maya.cmds.fluidEmitter
Volume offset of the emitter. Volume offset translates the emission volume by the specified amount from the actual emitter location. This is in the emitter’s local space.
Derived from mel command maya.cmds.fluidEmitter
Volume shape of the emitter. Sets/edits/queries the field’s volume shape attribute. If set to any value other than none, determines a 3-D volume within which particles are generated. Values are: cube,sphere,cylinder,cone,torus.
Derived from mel command maya.cmds.fluidEmitter
Volume sweep of the emitter. Applies only to sphere, cone, cylinder, and torus. Similar effect to the sweep attribute in modelling.
Derived from mel command maya.cmds.fluidEmitter
A command to set builtin fluid attributes such as Density, Velocity, etc for all cells in the grid from the initial state cache In query mode, return type is based on queried flag.
(<function loadFluid at 0x139077b90>, <function addCmdDocsCallback at 0x138d26320>, (‘loadFluid’, ‘’), {})
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
currentTime (ct) | bool | ||
|
|||
frame (f) | float | ||
This flag is now obsolete. Move the cache clip in the Trax editor to view different frames of the playback cache. Flag can have multiple arguments, passed either as a tuple or a list. |
|||
initialConditions (ic) | bool | ||
|
Derived from mel command maya.cmds.loadFluid
Example:
import pymel.core as pm
# Load the initial state cache into the fluid
pm.loadFluid( ic=True )
A command to extend the fluid grid, keeping the voxels the same size, and keeping the existing contents of the fluid in the same place. Note that the fluid transform is also modified to make this possible. In query mode, return type is based on queried flag.
(<function resampleFluid at 0x139094758>, <function addCmdDocsCallback at 0x138d26320>, (‘resampleFluid’, ‘’), {})
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
resampleDepth (rd) | int | ||
|
|||
resampleHeight (rh) | int | ||
|
|||
resampleWidth (rw) | int | ||
|
Derived from mel command maya.cmds.resampleFluid
Example:
import pymel.core as pm
# set width resolution to 3
pm.resampleFluid( rw=3 )
# set height resolution to 12
pm.resampleFluid( rh=12 )
# set all resolutions to 20
pm.resampleFluid( rw=20, rh=20, rd=20 )
A command to save the current state of the fluid to the initial state cache. The grids to be saved are determined by the cache attributes: cacheDensity, cacheVelocity, etc. These attributes are normally set from the options on Set Initial State. The cache must be set up before invoking this command. In query mode, return type is based on queried flag.
(<function saveFluid at 0x1390962a8>, <function addCmdDocsCallback at 0x138d26320>, (‘saveFluid’, ‘’), {})
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
currentTime (ct) | int | ||
|
|||
endTime (et) | int | ||
|
|||
startTime (st) | int | ||
|
Derived from mel command maya.cmds.saveFluid
Example:
import pymel.core as pm
# save the current state to the initial conditions cache
pm.saveFluid()
Possible values are noneand frame.Cycling emission restarts the random number stream after a specified interval. This can either be a number of frames or a number of emitted particles. In each case the number is specified by the cycleInterval attribute. Setting cycleEmission to frameand cycleInterval to 1 will then re-start the random stream every frame. Setting cycleInterval to values greater than 1 can be used to generate cycles for games work.
Derived from mel command maya.cmds.fluidEmitter
Specifies the number of frames or particles between restarts of the random number stream. See cycleEmission. Has no effect if cycleEmission is set to None.
Derived from mel command maya.cmds.fluidEmitter
Rate at which density is emitted.
Derived from mel command maya.cmds.fluidEmitter
Sets values of built-in fluid attributes such as density, velocity, etc., for individual grid cells or for all cells in the grid.
(<function setFluidAttr at 0x139099938>, <function addCmdDocsCallback at 0x138d26320>, (‘setFluidAttr’, ‘’), {})
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
addValue (ad) | bool | ||
|
|||
attribute (at) | unicode | ||
|
|||
clear (cl) | bool | ||
|
|||
floatRandom (fr) | float | ||
If this was a scalar (e.g. density) attribute, use a random value in +-VALUE If fv is specified, it is used as the base value and combined with the random value. If the fv flag is not specified, the base is assumed to be 0. |
|||
floatValue (fv) | float | ||
|
|||
lowerFace (lf) | bool | ||
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. Flag can have multiple arguments, passed either as a tuple or a list. |
|||
reset (re) | bool | ||
|
|||
vectorRandom (vr) | float, float, float | ||
If this was a vector (e.g. velocity) attribute, use a random value in +-VALUE If vv is specified, it is used as the base value and combined with the random value. If the vv flag is not specified, the base is assumed to be 0,0,0. |
|||
vectorValue (vv) | float, float, float | ||
|
|||
xIndex (xi) | int | ||
|
|||
xvalue (x) | bool | ||
|
|||
yIndex (yi) | int | ||
|
|||
yvalue (y) | bool | ||
|
|||
zIndex (zi) | int | ||
|
|||
zvalue (z) | bool | ||
|
Derived from mel command maya.cmds.setFluidAttr
Example:
import pymel.core as pm
# set density for entire fluid
pm.setFluidAttr( at='density', fv=1.0 )
# add 3.5 to the density at the cell x=1, y=2, z=3
pm.setFluidAttr( at='density', ad=True, fv-3.5, xi=1, yi=2, zi=3 )
# clear the density for the whole fluid
pm.setFluidAttr( at='density', cl=True )
# reset the velocity at the cell x=1, y=2, z=3
pm.setFluidAttr( at='velocity', re=True, xi=1, yi=2, zi=3 )
# set the velocity at the centers of the voxels on plane y=5
# to approximately (-1, 0, 0)
pm.setFluidAttr( at='velocity', vv=(-1, 0, 0), yi=5 )
# set the Z-component of the velocity at the bottom of cell [0, 0, 0]
# to exactly 1.3
pm.setFluidAttr( at='velocity', z=True, xi=0, yi=0, zi=0, fv=1.3 )
# set the X-component of the velocity at the right of cell [5, 3, 2]
# (which is also the left of cell [6, 3, 2]) to exactly 4.8
pm.setFluidAttr( at='velocity', x=True, xi=5, yi=3, zi=2, fv=4.8 )
# set the density to a random value in the range 0.1 to 0.9
# the fv flag specfies the base value, and then we add a a
# random value in the range of -fr to +fr
pm.setFluidAttr( at='density', fv=0.5, fr=0.4 )
Fluid Emission Dropoff in volume
Derived from mel command maya.cmds.fluidEmitter
Rate at which is emitted. Flag can have multiple arguments, passed either as a tuple or a list.
Derived from mel command maya.cmds.fluidEmitter
Rate at which density is emitted.
Derived from mel command maya.cmds.fluidEmitter
Maximum distance at which emission ends.
Derived from mel command maya.cmds.fluidEmitter
Minimum distance at which emission starts.
Derived from mel command maya.cmds.fluidEmitter
Positional emitter at world space location (x,y,z).
Derived from mel command maya.cmds.fluidEmitter
Rate at which particles emitted (can be non-integer). For point emission this is rate per point per unit time. For surface emission it is rate per square unit of area per unit time.
Derived from mel command maya.cmds.fluidEmitter
Section radius for a torus volume. Applies only to torus. Similar to the section radius in the torus modelling primitive.
Derived from mel command maya.cmds.fluidEmitter
Type of emitter. The choices are omni | dir | direction | surf | surface | curve | curv. The default is omni. The full definition of these types are: omnidirectional point emitter, directional point emitter, surface emitter, or curve emitter.
Derived from mel command maya.cmds.fluidEmitter
Volume offset of the emitter. Volume offset translates the emission volume by the specified amount from the actual emitter location. This is in the emitter’s local space.
Derived from mel command maya.cmds.fluidEmitter
Volume shape of the emitter. Sets/edits/queries the field’s volume shape attribute. If set to any value other than none, determines a 3-D volume within which particles are generated. Values are: cube,sphere,cylinder,cone,torus.
Derived from mel command maya.cmds.fluidEmitter
Volume sweep of the emitter. Applies only to sphere, cone, cylinder, and torus. Similar effect to the sweep attribute in modelling.
Derived from mel command maya.cmds.fluidEmitter