Your Ad Here

Go to: Synopsis. Flags. Return value. Python examples.

Synopsis

dynParticleCtx( dynParticleContext , [conserve=float], [cursorPlacement=boolean], [grid=boolean], [gridSpacing=float], [jitterRadius=float], [lowerLeftX=float], [lowerLeftY=float], [lowerLeftZ=float], [numJitters=int], [particleName=string], [sketch=boolean], [sketchInterval=int], [textPlacement=boolean], [upperRightX=float], [upperRightY=float], [upperZ=float])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

dynParticleCtx is undoable, queryable, and editable.

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 "particle" command that the context will issue.

Flags

conserve, cursorPlacement, grid, gridSpacing, jitterRadius, lowerLeftX, lowerLeftY, lowerLeftZ, numJitters, particleName, sketch, sketchInterval, textPlacement, upperRightX, upperRightY, upperZ
Long name (short name) [argument types] Properties
particleName(pn) string queryedit
Particle name.

In query mode, this flag needs a value.

conserve(c) float queryedit
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.

In query mode, this flag needs a value.

numJitters(nj) int queryedit
Number of jitters (instances) per particle.

In query mode, this flag needs a value.

jitterRadius(jr) float queryedit
Max radius from the center to place the particle instances.

In query mode, this flag needs a value.

sketch(sk) boolean queryedit
Create particles in sketch mode.

In query mode, this flag needs a value.

sketchInterval(ski) int queryedit
Interval between particles, when in sketch mode.

In query mode, this flag needs a value.

grid(gr) boolean queryedit
Create a particle grid.

In query mode, this flag needs a value.

gridSpacing(grs) float queryedit
Spacing between particles in the grid.

In query mode, this flag needs a value.

cursorPlacement(cp) boolean queryedit
Use the cursor to place the lower left and upper right of the grid.

In query mode, this flag needs a value.

textPlacement(tp) boolean queryedit
Use the textfields to specify the lower left and upper right of/ the grid.

In query mode, this flag needs a value.

lowerLeftX(llx) float queryedit
Lower left X position of the particle grid.

In query mode, this flag needs a value.

lowerLeftY(lly) float queryedit
Lower left Y position of the particle grid.

In query mode, this flag needs a value.

lowerLeftZ(llz) float queryedit
Lower left Z position of the particle grid.

In query mode, this flag needs a value.

upperRightX(urx) float queryedit
Upper right X position of the particle grid.

In query mode, this flag needs a value.

upperRightY(ury) float queryedit
Upper right Y position of the particle grid.

In query mode, this flag needs a value.

upperZ(urz) float queryedit
Upper right Z position of the particle grid.

In query mode, this flag needs a value.


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 have multiple arguments, passed either as a tuple or a list.

Return value


none

Python examples

import maya.cmds as cmds

cmds.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.

  

Return to Autodesk Index


Your Ad Here