Go to: Synopsis. Return value. Keywords. Related. Flags. MEL examples.
transferShadingSets [-sampleSpace uint] [-searchMethod uint]
transferShadingSets is undoable, queryable, and editable.
Command to transfer shading set assignments between meshes. The last mesh in the list receives the shading assignments from the other meshes.None
In query mode, return type is based on queried flag.
Long name (short name) | Argument types | Properties | ||
---|---|---|---|---|
-sampleSpace(-spa)
|
uint
|
|||
|
||||
-searchMethod(-sm)
|
uint
|
|||
|
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. |
// make a low res sphere with shaders string $low[] = `polySphere -sx 6 -sy 6`; string $lowShape[] = `listRelatives -fullPath -shapes $low[0]`; string $redSG = `sets -r 1 -em`; string $redMat = `shadingNode -asShader "lambert"`; setAttr ($redMat + ".color") -type "double3" 1 0 0; connectAttr -f ($redMat + ".outColor") ($redSG + ".surfaceShader"); string $greenSG = `sets -r 1 -em`; string $greenMat = `shadingNode -asShader "lambert"`; setAttr ($greenMat + ".color") -type "double3" 0 1 0; connectAttr -f ($greenMat + ".outColor") ($greenSG + ".surfaceShader"); sets -e -fe $redSG ( $lowShape[0] + ".f[0:17]" ); sets -e -fe $greenSG ( $lowShape[0] + ".f[18:36]" ); // make a high res sphere string $high[] = `polySphere -sx 20 -sy 20`; string $highShape[] = `listRelatives -fullPath -shapes $high[0]`; xform -ws -t 2 0 0 $high[0]; // transfer the shading sets select -r $low[0]; select -tgl $high[0]; transferShadingSets -sampleSpace 1;