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. Particles 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. Keyframeable attributes of the emitter node: rate, directionX, directionY, directionZ, minDistance, maxDistance, spread.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
alongAxis (alx) | float | ||
|
|||
aroundAxis (arx) | float | ||
|
|||
awayFromAxis (afx) | float | ||
Initial velocity multiplier in the direction away from the central axis of the volume. See the diagrams in the documentation. Used only with the cylinder, cone, and torus volume emitters. |
|||
awayFromCenter (afc) | float | ||
|
|||
cycleEmission (cye) | unicode | ||
Possible values are “none” and “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 “frame” and 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. |
|||
cycleInterval (cyi) | int | ||
|
|||
directionX (dx) | float | ||
|
|||
directionY (dy) | float | ||
|
|||
directionZ (dz) | float | ||
|
|||
directionalSpeed (drs) | float | ||
For volume emitters only, adds a component of speed in the direction specified by the directionX, Y, and Z attributes. Applies only to volume emitters. Does not apply to other types of emitters. |
|||
maxDistance (mxd) | float | ||
|
|||
minDistance (mnd) | float | ||
|
|||
name (n) | unicode | ||
needParentUV (nuv) | bool | ||
If aNeedParentUV is true, compute parentUV value from each triangle or each line segment, then send out to the target particle object. You also need to add parentU and parentV attributes to the particle object to store these values. |
|||
normalSpeed (nsp) | float | ||
Normal speed multiple for point emission. For each emitted particle, multiplies the component of the velocity normal to the surface or curve by this amount. Surface and curve emitters only. |
|||
position (pos) | float, float, float | ||
|
|||
randomDirection (rnd) | float | ||
|
|||
rate (r) | float | ||
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. |
|||
scaleRateByObjectSize (sro) | bool | ||
Applies to curve and surface emitters, only. If true, number of particles is determined by object size (area or length) times rate value. If false, object size is ignored and the rate value is used without modification. The former is the way Maya behaved prior to version 3.0.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
scaleSpeedBySize (ssz) | bool | ||
|
|||
speed (spd) | float | ||
|
|||
speedRandom (srn) | float | ||
Identifies a range of random variation for the speed of each generated particle. If set to a non-zero value, speed becomes the mean value of the generated particles, whose speeds vary by a random amount up to plus or minus speedRandom/2. For example, speed 5 and speedRandom 2 will make the speeds vary between 4 and 6. |
|||
spread (sp) | float | ||
|
|||
tangentSpeed (tsp) | float | ||
Tangent speed multiple for point emission. For each emitted particle, multiplies the component of the velocity tangent to the surface or curve by this amount. Surface and curve emitters only. |
|||
torusSectionRadius (tsr) | float | ||
|
|||
type (typ) | unicode | ||
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. |
|||
volumeOffset (vof) | float, float, float | ||
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. |
|||
volumeShape (vsh) | unicode | ||
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.” |
|||
volumeSweep (vsw) | float | ||
|
Derived from mel command maya.cmds.emitter
Example:
import pymel.core as pm
import maya.cmds as cmds
pm.particle( p=((-1, 5, 2), (2, 2, 2), (3, 3, 3)), n='particles' )
# Result: [nt.Transform(u'particles'), nt.Particle(u'particlesShape')] #
pm.emitter( 'particles', r=300, mnd=1.5, mxd=2.5, n='emitter' )
# Result: nt.Transform(u'particles') #
pm.particle( n='emitted' )
# Result: [nt.Transform(u'emitted'), nt.Particle(u'emittedShape')] #
pm.connectDynamic( 'emitted', em='emitter' )
# Result: [u'emittedShape'] #
# Creates a particle emitter.
pm.emitter( dx=1, dy=0, dz=0, sp=0.33, pos=(1, 1, 1), n='myEmitter' )
# Result: nt.PointEmitter(u'myEmitter') #
pm.particle( n='emittedParticles' )
# Result: [nt.Transform(u'emittedParticles'), nt.Particle(u'emittedParticlesShape')] #
pm.connectDynamic( 'emittedParticles', em='myEmitter' )
# Result: [u'emittedParticlesShape'] #
# Creates a point emitter.