// =========================================================================== // 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 doBlendShapeAddSelectionAsInBetweenTarget( string $bsNodeName, int $checkTopo, int $heroTargetIndex, float $inBetweenWeight, int $inBetweenType ) // // Description: // Add an in-between target with/without selection // // Input Arguments: // bsNodeName - Blend shape name; // checkTopo - If check topology; // heroTargetIndex - Hero target index to add the in-between target; // inBetweenWeight - Maximum influence weight of the in-between target; // inBetweenType - The type of in-between target to create, relative/absolute to hero target; // { // Filter out valid target meshes from selection string $sel[] = `ls -dag -g -sl`; string $selectedGeoms[]; for ($i = 0; $i < size($sel); ++ $i) { if (blendShapeCanAddAsTarget($sel[$i])) $selectedGeoms = stringArrayCatenate($selectedGeoms, {$sel[$i]}); } if(size($selectedGeoms) == 0) { error((uiRes("m_doBlendShapeAddSelectionAsInBetweenTarget.kNoTargetMeshSelected"))); return; // No target mesh selected } doBlendShapeAddInBetweenTarget( $bsNodeName, $checkTopo, $heroTargetIndex, $inBetweenWeight, $inBetweenType, $selectedGeoms ); return ; }