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

Synopsis

addPP [-attribute string] objects

addPP is undoable, NOT queryable, and NOT editable.

Adds per-point (per-cv, per-vertex, or per-particle) attribute capability for an attribute of an emitter or field. The -atr flag identifies the attribute. If no attribute is named, addPP returns a warning and does nothing. The command adds any other necessary attributes wherever they are needed, and makes all necessary connections. If any of the attributes already exist, the command simply connects to them. The command also toggles any relevant attributes in the emitter or field to indicate that per-point capability is being used. The command adds a separate per-point attribute to the owning object for each emitter/field. For example, for emission rate, there is a separate ratePP for each emitter. These attributes are named according to the convention <emitter/field name><attr name>PP. For example, if a particle shape owned an emitter "smoke", that shape would get attribute "smokeRatePP." The name of the object must be the emitter or field for which per-point capability is to be added (or the name of its parent transform). The addPP command adds the per-point capability for that emitter or field but not for any others owned by the same object. If per-point capability is not supported for a named object, the command will issue a warning, but will continue executing for any other objects which were valid. If no objects are named, addPP uses any objects in the current selection list for which the specified attribute is applicable. (For example, it would add per-point rate for all selected emitters.) If addPP detects that the owner object has left-over attributes from a deleted emitter, it will remove those attributes before adding the new ones. Thus, you can delete the emitter, make a new one, and run addPP again, and addPP will clean up after the deleted emitter. This is most commonly used if you have a geometry emitter and then decide to change the geometry. Likewise, if addPP detects that some cvs or vertices have been added to the geometry, then it will expand the corresponding multi-attributes as necessary. However, if it detects that some cvs/vertices have been removed, it will not remove any entries from the multi. See the user manual for more discussion.

Return value

string[] Returns names of emitters/fields for which the per-point capability was added for the specified attribute.

Related

emitter, particle

Flags

attribute
Long name (short name) Argument types Properties
-attribute(-atr) string create
Name of attribute to which you wish to add PP capability. Currently the only attribute supported is rate (for emitters).

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

emitter -pos 0 0 0 -type omni -n myEmitter1;
particle -n myParticle1;
connectDynamic -em myEmitter1 myParticle1;
select -r myParticle1;
emitter -type omni -n myEmitter2;
particle -n myParticle2;
connectDynamic -em myEmitter2 myParticle2;
addPP -atr "rate" myEmitter2;

// Suppose that myEmitter2 is owned by a particle shape, "myParticle1."
// addPP will add an attribute "myEmitter2RatePP" to myParticle1, will connect
// myParticle1.myEmitter2RatePP to myEmitter2.ratePP, and will set my2Emitter.useRatePP
// to true.