// =========================================================================== // 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. // =========================================================================== // // // Creation Date: May, 2000 // // Procedure Name: // doPruneSkinClusterWeightsArgList // // Description: // prune skinCluster weights // // Input Arguments: // $version: The version of this option box. Used to know how to // interpret the $args array. // "1" : first verison of nla // // $args // Version 1 // [0] $weight : weights below this value will be pruned // // Return Value: // $string: The command string // global proc doPruneSkinClusterWeightsArgList( string $version, string $args[] ) { string $currentSelection[] = `ls -selection`; float $weight = $args[0]; int $foundSkin = 0; for ($sel in $currentSelection) { // find skin shapes // string $buff[]; tokenize($sel,".",$buff); string $sCluster = findRelatedSkinCluster($buff[0]); if ("" != $sCluster) { $foundSkin = 1; select -r $sel; string $cmd = ("skinPercent -prw "+$weight+" "+$sCluster); eval($cmd); } } select -r $currentSelection; if (! $foundSkin) { error( (uiRes("m_doPruneSkinClusterWeightsArgList.kSelectSkin"))); } }