// =========================================================================== // 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: 19 Nov 1998 // // // Procedure Name: // performWrap // // Description: // Old starting point of all wrap operations. Calls doWrapArgList // with version set to "1" and one argument for the operation type // // Input Arguments: // operation: 1 - Create a new wrap // 2 - Add influence // 3 - Remove influence // // Return Value: // [string] The name of the wrap node involved in the operation // global proc string[] performWrap(int $operation) { // call performCreateWrap to ensure the optionVars are initialized // performCreateWrap 2; string $cmd; float $exclusive = `optionVar -query exclusiveBind`; float $autoWeightThreshold = `optionVar -query autoWeightThreshold`; float $thresh = `optionVar -query weightThreshold`; float $maxDist = 0.0; int $limitInfl = `optionVar -q limitWrapInfluence`; if ($limitInfl == 1) { $maxDist = `optionVar -query maxDistance`; } int $inflType = 2; if (`optionVar -exists wrapInflType`) { $inflType = `optionVar -q wrapInflType`; if ($inflType < 1) { $inflType = 2; } } int $renderInfl = `optionVar -query renderInfl`; string $falloffMode = `optionVar -q falloffMode`; int $falloff = 0; if($falloffMode == "surface") $falloff = 1; $cmd = ("doWrapArgList \"7\" { \"" + $operation + "\"" + ", \""+$thresh+"\"" + ", \""+$maxDist+"\"" + ", \""+$inflType+"\" " + ", \""+$exclusive+"\"" + ", \""+$autoWeightThreshold+"\"" + ", \""+$renderInfl+"\"" + ", \""+$falloff+"\"" + " }"); return eval($cmd); }