// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== global proc artAttrSkinWeightCopy() { global string $gSkinWeightCopyInfluences[]; global float $gSkinWeightCopyWeights[]; string $sel[] = `ls -sl -flatten`; if(size($sel) < 1) { error((uiRes("m_artAttrSkinWeightCopy.kArtAttrSkinCopyWeightNoVertsSelected"))); return; } if(size($sel) > 1) { error((uiRes("m_artAttrSkinWeightCopy.kArtAttrSkinCopyWeightTooManySelected"))); return; } string $skinCluster = findSkinClusterFromSelectedComponent($sel[0]); if($skinCluster == "") return; $gSkinWeightCopyInfluences = `skinCluster -q -influence $skinCluster`; $gSkinWeightCopyWeights = `skinPercent -q -v $skinCluster`; }