Skip to content

Poly Skin Weights Command

Ryan Porter edited this page Feb 25, 2017 · 3 revisions

polySkinWeights

Synopsis

polySkinWeights
    [-destinationSkin],
    [-destinationMesh],
    [-direction],
    [-flip],
    [-influenceSymmetry],
    [-mirror],
    [-sourceSkin],
    [-sourceMesh]
    [skinCluster]

polyDeformerWeights is undoable, queryable, and editable.

Command to copy, mirror, or flip the skin weights. The command can be used to copy weights from one mesh to another or to modify weights on the same mesh.

In query mode, the return value is based on queried flag.

Long name (short name) Argument types Properties
destinationSkin (ds) string [C]
Specifies the skinCluster to which the weights will be copied. If this flag is not used, the skinCluster specified by the -sourceSkin flag will be used.
destinationMesh (dm) string [C]
Specifies the destination deformed mesh. If this flag is not used, the mesh specified by the -sourceMesh flag will be used.
direction (d) int [C]
Specifies the direction that a mirror operation will occur in. Must be 1 (left to right) or -1 (right to left). Only applicable when the -mirror flag is also used. By default, weights will be mirrored from left to right.
flip (f) boolean [C]
When the flip flag is used, the weights of symmetrical vertices are swapped.
influenceSymmetry (inf) string, string [E]
Required in edit mode. Provides the pattern for matching left side and right side joints. Patterns must have at least one wildcard ('*') character. Automatically sets the .side and .otherType attributes on all joint influences of the selected skinCluster so that a symmetry table can be built when this command is used to mirror weights.
mirror (m) boolean [C]
When the mirror flag is used, the weights of the vertices on the source side (specified by the -direction flag) are copied to the symmetrical vertices..
sourceSkin (ss) string [C]
Specifies the skinCluster from which the weights will be copied.
sourceMesh (sm) string [C]
Specifies the source deformed mesh.

Examples

// This command sets the `.side` and `.otherType` attributes on all joint 
// influences on the specified skinCluster so that in the future the command can 
// build an influence symmetry table to mirror weights. If the joints are not 
// configured in this way, the weights may not mirror as expected.

polySkinWeights -edit -influenceSymmetry "L_*" "R_*" skinCluster1;
// This command mirrors the weights on the specified skinCluster using the 
// pre-computed symmetry data for the specified mesh. If symmetry data has not been 
// computed this command will fail.

polySkinWeights -sourceMesh head_MESH -sourceSkin head_skinCluster -mirror;
// This command copies the weights on the source mesh to the destination mesh. 
// The destination mesh must be skinned. The source mesh and destination mesh must 
// be point compatible.

polySkinWeights -sourceMesh head_MESH -sourceSkin head_skinCluster -destinationMesh other_MESH -destinationSkin otherHead_skinCluster;
// This command queries the influence symmetry of the selected skinCluster. 
polySkinWeights -query -influenceSymmetry head_skinCluster;
// Result: L_eye:R_eye L_ear:R_rear C_head:C_head
Clone this wiki locally