Go to: Synopsis. Return value. Keywords. Flags. MEL examples.

Synopsis

particleInstancer [-addObject] [-aimAxis string] [-aimDirection string] [-aimPosition string] [-aimUpAxis string] [-aimWorldUp string] [-attributeMapping] [-cycle string] [-cycleStartObject string] [-cycleStep float] [-cycleStepUnits string] [-index int] [-instanceId string] [-levelOfDetail string] [-name string] [-object string] [-objectIndex string] [-particleAge string] [-position string] [-removeObject] [-rotation string] [-rotationOrder string] [-rotationType string] [-rotationUnits string] [-scale string] [-shear string] [-visibility string]

particleInstancer is undoable, queryable, and editable.

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.

Return value

string

In query mode, return type is based on queried flag.

Keywords

particle, instancer

Flags

addObject, aimAxis, aimDirection, aimPosition, aimUpAxis, aimWorldUp, attributeMapping, cycle, cycleStartObject, cycleStep, cycleStepUnits, index, instanceId, levelOfDetail, name, object, objectIndex, particleAge, position, removeObject, rotation, rotationOrder, rotationType, rotationUnits, scale, shear, visibility
Long name (short name) Argument types Properties
-name(-n) string createquery
This flag sets or queries the name of the instancer node.
-object(-obj) string createqueryeditmultiuse
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.
-addObject(-a) createedit
This flag indicates that objects specified by the -object flag will be added to the instancer node as instanced objects.
-removeObject(-rm) edit
This flag indicates that objects specified by the -object flag will be removed from the instancer node as instanced objects.
-cycle(-c) string createqueryedit
This flag sets or queries the cycle attribute for the instancer node. The options are "none", "sequential". The default is "none".
-cycleStep(-cs) float createqueryedit
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) string createqueryedit
This flag sets or queries the cycle step unit attribute for the instancer node. The options are "frames" or "seconds". The default is "frames".
-index(-i) int query
This flag is used to query the name of the ith instanced object.
-levelOfDetail(-lod) string createqueryedit
This flag sets or queries the level of detail of the instanced objects. The options are "geometry", "boundingBox" or "boundingBoxes". The default is "geometry".
-attributeMapping(-am) query
This flag queries the particle attribute mapping list.
-aimDirection(-ad) string createqueryedit
This flag sets or queries the particle attribute name to be used for the aim direction of the instanced objects.
-aimPosition(-ap) string createqueryedit
This flag sets or queries the particle attribute name to be used for the aim position of the instanced objects.
-aimAxis(-aa) string createqueryedit
This flag sets or queries the particle attribute name to be used for the aim axis of the instanced objects.
-aimUpAxis(-aua) string createqueryedit
This flag sets or queries the particle attribute name to be used for the aim up axis of the instanced objects.
-aimWorldUp(-awu) string createqueryedit
This flag sets or queries the particle attribute name to be used for the aim world up of the instanced objects.
-particleAge(-age) string createqueryedit
This flag sets or queries the particle attribute name to be used for the age of the instanced objects.
-cycleStartObject(-sto) string createqueryedit
This flag sets or queries the particle attribute name to be used for the cycle start object of the instanced objects.
-objectIndex(-oi) string createqueryedit
This flag sets or queries the particle attribute name to be used for the object index of the instanced objects.
-position(-p) string createqueryedit
DEFAULT "worldPosition" This flag sets or queries the particle attribute name to be used for the positions of the instanced objects. By default the attribute is worldPosition.
-rotation(-r) string createqueryedit
This flag sets or queries the particle attribute name to be used for the rotation of the instanced objects.
-rotationType(-rt) string createqueryedit
This flag sets or queries the particle attribute name to be used for the rotation type of the instanced objects.
-rotationOrder(-ro) string createqueryedit
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.
-rotationUnits(-ru) string createqueryedit
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) string createqueryedit
This flag sets or queries the particle attribute name to be used for the scale of the instanced objects.
-shear(-sh) string createqueryedit
This flag sets or queries the particle attribute name to be used for the shear of the instanced objects.
-visibility(-vis) string createqueryedit
This flag sets or queries the particle attribute name to be used for the visibility of the instanced objects.
-instanceId(-id) string query
This flag queries the particle attribute name to be used for the id of the instanced objects.

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 be used more than once in a command.

MEL examples

// create a cube and a particle emitter
//
polyCube;
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 ;
particle;
connectDynamic -em emitter1 particle1;
# instance the cube to each particle emitted
particleInstancer  -addObject -object "pCube1" -cycle None -cycleStep 1 -cycleStepUnits Frames -levelOfDetail Geometry -rotationUnits Degrees -rotationOrder XYZ -position worldPosition -age age particleShape1;
# query the instancer associated with the particle
particleInstancer -q -name particle1;
# query the particle attribute name corresponding to the position attribute for the instancer
particleInstancer -name instancer1 -q -position particle1;