deformerWeights is undoable, queryable, and editable.
WARNING NOTE - THIS COMMAND IS PART OF THE BONUS TOOL AND ISN'T FULLY SUPPORTED YET.
Command to import and export deformer weights to and from a simple XML
file. The weight data is stored in a per-vertex fashion along with a
"point cloud" corresponding to the vertices from the geometry input to
the deformer.
For example a cluster deformer would have the following information:
In query mode, return type is based on queried flag.
Long name (short name) |
Argument types |
Properties |
-export(-ex)
|
|
|
|
Export the given deformer
|
|
-import(-im)
|
|
|
|
Import weights to the specified deformer. See the method flag for details
on how the weights will be mapped to the destination deformer.
|
|
-path(-p)
|
string
|
|
|
The path to the given file. Default to the current project.
|
|
-shape(-sh)
|
string
|
|
|
Specify the source shape. Export will write out all the deformers on the shape node into one file.
|
|
-deformer(-df)
|
string
|
|
|
Specify the deformer whose weights should be exported or imported.
|
|
-method(-m)
|
string
|
|
|
Specify the method used to map the weight during import. Valid values are:
"index", "nearest", "barycentric" and "over". The "index" method
uses the vertex index to map the weights onto the object. This is most useful
when the destination object shares the same topology as the exported data.
The "nearest" method finds the nearest vertex in the imported data set and
sets the weight value to that value. This is best used when mapping a higher
resolution mesh to a lower resolution. The "barycentric" method is only
supported with polygon meshes. It finds the nearest triangle of the target
geometry and rescales the weights by how close the source point
is to the vertices. This is normally used with a coarse mesh being mapped to
a high resolution mesh. The "over" method is similar to the "index" method but
the weights on the destination mesh are not cleared prior to mapping, so that
unmatched indices keep their weights intact.
|
|
-ignoreName(-ig)
|
|
|
|
Ignore the names of the layers on import, just use the order of the layers instead. This can be used for
case that joint names have been changed. Leaving it on only name that match on import will be write to the deformer.
|
|
-worldSpace(-ws)
|
|
|
|
For spatially based association methods (barycentric and nearest), the position should be based on the world space position
rather then the local object space.
|
|
-weightTolerance(-wt)
|
float
|
|
|
The weight tolerance is used to decide if a given weight value is close enough to the default value that it does not need to be included. This flag is only used with export. The default value is .001.
|
|
-positionTolerance(-pt)
|
float
|
|
|
The position tolerance is use to determine the radius of search for nearest and barycenteric searches. This flag is only
used with import.
Defaults to a huge number.
|
|
-defaultValue(-dv)
|
float
|
|
|
Manually set the default value. Default values are values that are not written to file. For example, for blendShapes the default value is automatically set to 1.0 and these values are not written to disk. For skinClusters the value is 0.0. If you want to force all weights to be written to disk you can set a defaultValue = -1.0.
|
|