pymel.core.context.dynParticleCtx

static context.dynParticleCtx(*args, **kwargs)

The particle context command creates a particle context. The particle context provides an interactive means to create particle objects. The particle context command also provides an interactive means to set the option values, through the Tool Property Sheet, for the particlecommand that the context will issue. In query mode, return type is based on queried flag.

Flags:
Long name (short name) Argument Types Properties
conserve (c) float ../../../_images/query.gif ../../../_images/edit.gif
 

Conservation of momentum control (between 0 and 1). For smaller values, the field will tend to erase any existing velocity the object has (in other words, will not conserve momentum from frame to frame). A value of 1 (the default) corresponds to the true physical law of conservation of momentum.

cursorPlacement (cp) bool ../../../_images/query.gif ../../../_images/edit.gif
 
Use the cursor to place the lower left and upper right of the grid.
exists (ex) bool  
   
grid (gr) bool ../../../_images/query.gif ../../../_images/edit.gif
 
Create a particle grid.
gridSpacing (grs) float ../../../_images/query.gif ../../../_images/edit.gif
 
Spacing between particles in the grid.
history (ch) bool  
   
image1 (i1) unicode  
   
image2 (i2) unicode  
   
image3 (i3) unicode  
   
jitterRadius (jr) float ../../../_images/query.gif ../../../_images/edit.gif
 
Max radius from the center to place the particle instances.
lowerLeftX (llx) float ../../../_images/query.gif ../../../_images/edit.gif
 
Lower left X position of the particle grid.
lowerLeftY (lly) float ../../../_images/query.gif ../../../_images/edit.gif
 
Lower left Y position of the particle grid.
lowerLeftZ (llz) float ../../../_images/query.gif ../../../_images/edit.gif
 
Lower left Z position of the particle grid.
name (n) unicode  
   
nucleus (nc) bool ../../../_images/query.gif ../../../_images/edit.gif
 
If set true then an nParticle is generated with a nucleus node connection. Otherwise a standard particle is created.
numJitters (nj) int ../../../_images/query.gif ../../../_images/edit.gif
 
Number of jitters (instances) per particle.
particleName (pn) unicode ../../../_images/query.gif ../../../_images/edit.gif
 
Particle name.
sketch (sk) bool ../../../_images/query.gif ../../../_images/edit.gif
 
Create particles in sketch mode.
sketchInterval (ski) int ../../../_images/query.gif ../../../_images/edit.gif
 
Interval between particles, when in sketch mode.
textPlacement (tp) bool ../../../_images/query.gif ../../../_images/edit.gif
 
Use the textfields to specify the lower left and upper right of/ the grid.
upperRightX (urx) float ../../../_images/query.gif ../../../_images/edit.gif
 
Upper right X position of the particle grid.
upperRightY (ury) float ../../../_images/query.gif ../../../_images/edit.gif
 
Upper right Y position of the particle grid.
upperZ (urz) float ../../../_images/query.gif ../../../_images/edit.gif
 
Upper right Z position of the particle grid. Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.dynParticleCtx

Example:

import pymel.core as pm

pm.dynParticleCtx( 'dynParticleContext', e=True, nj=5, jr=1.5 )
# Set the option values for number of jitters to 5 and jitter
# radius to 1.5 in the particle context, which will result in
# creating 5 particles for each mouse click in the viewport,
# randomly placed, but all within 1.5 units of the mouse click.

Previous topic

pymel.core.context.dynPaintCtx

Next topic

pymel.core.context.dynSelectCtx

Core

Core Modules

Other Modules

This Page