// =========================================================================== // 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. // =========================================================================== // // Procedure Name: // polySelectEdges // // Description: // This procedure selects edge rings and loops // for selected edges. // // Input Arguments: // $method: the flag from the polySelect MEL command to use // "edgeLoop" or "edgeRing" // // Return Value: // None. global proc polySelectEdges(string $method) { string $edges[] = `getEdges`; if (`size $edges`){ string $buffer[]; int $numTokens; $numTokens = `tokenize $edges[0] "[]" $buffer`; string $cmd = "polySelect -"; $cmd += $method; $cmd += " "; $cmd += $buffer[1]; if (`size $edges` > 1){ int $i; for ($i = 1;$i < `size $edges`;$i++){ $numTokens = `tokenize $edges[$i] "[]" $buffer`; $cmd += " -"; $cmd += $method; $cmd += " "; $cmd += $buffer[1]; } } eval($cmd); } }