Go to: Synopsis. Return value. Related. Flags. MEL examples.
dynExport [-allObjects boolean] [-attribute string] [-format string] [-maxFrame time] [-minFrame time] [-overSampling int] [-path string]
[objects]
dynExport is undoable, NOT queryable, and NOT editable.
Export particle data to disk files.For cache export (-format cache), dynExport also sets three attributes of the current dynGlobals node. It sets the useParticleRenderCache attribute to true, and the min/maxFrameOfLastParticleRenderCache attributes to correspond to the min and max frames.
Exported .pda or .pdb files are assigned a name of form object name.frame.extension, where extension is "pda" or "pdb."
The naming convention for .pdc files is similar but does not use frame numbers, it uses a more precise representation of the time instead.
By default, the pda and pdb formats export all per-particle attributes, and all integer or float type attributes except those which are hidden or not storable. (Exception: level of detail is not exported, by default) The pdc format exports all attributes which the particle object needs for its state cache.
To specify only selected attributes, use the -atr flag (which is multi-use). In general, it is recommended not to use this flag with pdc type, since you need all the attributes in order for the cache to be useful.
dynExport exports data for the current frame, or for a range of frames specified with -mnf and -mxf. If you are not already at the start frame, dynExport will run up the scene for you. VERY VERY IMPORTANT NOTE: If you use dynExport in -prompt mode, it does NOT automatically force evaluation of your objects. You must do this yourself from your script. The easiest way is to request each particle object's "count" attribute each frame. You must request the count attribute for each object you want to export, because their solvers run independently of one another. In interactive mode, objects WILL get evaluated automatically and you don't have to worry about any of this.
When exporting a particle object whose particles are created from collisions involving particles in another particle object(s), you must make sure you simultaneously export all the particle objects involved in the dependency chain otherwise you will get an empty cache file.
For non-per-particle attributes, pda and pdb formats write the identical value once for each particle. The following types of non-per-particle attributes can be exported: float, double, doubleLinear, doubleAngle, byte, short, long, enum. The first four are exported as "Real" (in PDB parlance), and the last four as "Integer."
In the pda and pdb formats, "particleId" and "particleId0" are exported as Integer, and are exported under the names "id" and "id0" respectively. All other attributes are exported under their long names.
string | Path to the exported files |
Long name (short name) | Argument types | Properties | ||
---|---|---|---|---|
-attribute(-atr)
|
string
|
![]() ![]() |
||
|
||||
-minFrame(-mnf)
|
time
|
![]() |
||
|
||||
-maxFrame(-mxf)
|
time
|
![]() |
||
|
||||
-overSampling(-os)
|
int
|
![]() |
||
|
||||
-allObjects(-all)
|
boolean
|
![]() |
||
|
||||
-path(-p)
|
string
|
![]() |
||
|
||||
-format(-f)
|
string
|
![]() |
||
|
![]() |
![]() |
![]() |
![]() |
dynExport -mnf 5 -mxf 10 -os 2 -atr position -atr velocity -p "PDB" particle1; // Export position and velocity attributes for particle1 // for frames 5 through 10 at every half frame interval, // to files in subdirectory "PDB" of the workspace root // directory. The default format (binary) will be used.