pymel.core.effects.particleInstancer

particleInstancer(*args, **kwargs)

This command is used to create a particle instancer node and set the proper attributes in the particle shape and in the instancer node. It will also create the connections needed between the particle shape and the instancer node.

Flags:
Long name (short name) Argument Types Properties
addObject (a) bool ../../../_images/create.gif ../../../_images/edit.gif
 
This flag indicates that objects specified by the -object flag will be added to the instancer node as instanced objects.
aimAxis (aa) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag sets or queries the particle attribute name to be used for the aim axis of the instanced objects.
aimDirection (ad) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag sets or queries the particle attribute name to be used for the aim direction of the instanced objects.
aimPosition (ap) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag sets or queries the particle attribute name to be used for the aim position of the instanced objects.
aimUpAxis (aua) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag sets or queries the particle attribute name to be used for the aim up axis of the instanced objects.
aimWorldUp (awu) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag sets or queries the particle attribute name to be used for the aim world up of the instanced objects.
attributeMapping (am) bool ../../../_images/query.gif
 
This flag queries the particle attribute mapping list.
cycle (c) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag sets or queries the cycle attribute for the instancer node. The options are none, sequential. The default is none.
cycleStartObject (sto) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag sets or queries the particle attribute name to be used for the cycle start object of the instanced objects.
cycleStep (cs) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

This flag sets or queries the cycle step attribute for the instancer node. This attribute indicates the size of the step in frames or seconds (see cycleStepUnits).

cycleStepUnits (csu) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag sets or queries the cycle step unit attribute for the instancer node. The options are framesor seconds. The default is frames.
index (i) int ../../../_images/query.gif
 
This flag is used to query the name of the ith instanced object.
instanceId (id) unicode ../../../_images/query.gif
 

This flag queries the particle attribute name to be used for the id of the instanced objects. Flag can have multiple arguments, passed either as a tuple or a list.

levelOfDetail (lod) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag sets or queries the level of detail of the instanced objects. The options are geometry, boundingBoxor boundingBoxes. The default is geometry.
name (n) unicode ../../../_images/create.gif ../../../_images/query.gif
 
This flag sets or queries the name of the instancer node.
object (obj) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

This flag indicates which objects will be add/removed from the list of instanced objects. The flag is used in conjuction with the -addObject and -remove flags. If neither of these flags is specified on the command line then -addObject is assumed.

objectIndex (oi) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag sets or queries the particle attribute name to be used for the object index of the instanced objects.
particleAge (age) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag sets or queries the particle attribute name to be used for the age of the instanced objects.
position (p) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

DEFAULT worldPositionThis flag sets or queries the particle attribute name to be used for the positions of the instanced objects. By default the attribute is worldPosition.

removeObject (rm) bool ../../../_images/edit.gif
 
This flag indicates that objects specified by the -object flag will be removed from the instancer node as instanced objects.
rotation (r) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag sets or queries the particle attribute name to be used for the rotation of the instanced objects.
rotationOrder (ro) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag specifies the rotation order associated with the rotation flag. The options are XYZ, XZY, YXZ, YZX, ZXY, or ZYX. By default the attribute is XYZ.
rotationType (rt) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag sets or queries the particle attribute name to be used for the rotation type of the instanced objects.
rotationUnits (ru) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag specifies the rotation units associated with the rotation flag. The options are degrees or radians. By default the attribute is degrees.
scale (sc) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag sets or queries the particle attribute name to be used for the scale of the instanced objects.
shear (sh) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag sets or queries the particle attribute name to be used for the shear of the instanced objects.
visibility (vis) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag sets or queries the particle attribute name to be used for the visibility of the instanced objects.

Derived from mel command maya.cmds.particleInstancer

Example:

import pymel.core as pm

# create a cube and a particle emitter
pm.polyCube()
# Result: [nt.Transform(u'pCube1'), nt.PolyCube(u'polyCube1')] #
pm.emitter(pos=(0,0,0), type='omni', r=100, sro=0, nuv=0, cye='none', cyi=1, spd=1, srn=0, nsp=1, tsp=0, mxd=0, mnd=0, dx=1, dy=0, dz=0, sp=0)
# Result: nt.PointEmitter(u'emitter1') #
pm.particle()
# Result: [nt.Transform(u'particle1'), nt.Particle(u'particleShape1')] #
pm.connectDynamic('particle1',em='emitter1')
# Result: [u'particleShape1'] #
# instance the cube to each particle emitted
pm.particleInstancer( 'particleShape1', addObject=True, object='pCube1', cycle='None', cycleStep=1, cycleStepUnits='Frames', levelOfDetail='Geometry', rotationUnits='Degrees', rotationOrder='XYZ', position='worldPosition', age='age')
# Result: u'instancer1' #
# query the instancer associated with the particle
pm.particleInstancer( 'particle1', q=True, name=True )
# Result: [u'instancer1'] #
# query the particle attribute name corresponding to the position attribute for the instancer
pm.particleInstancer( 'particle1', name='instancer1', q=True, position=True )

Previous topic

pymel.core.effects.particleFill

Next topic

pymel.core.effects.particleRenderInfo

Core

Core Modules

Other Modules

This Page