// =========================================================================== // 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: // polySelectEdgesPattern // // Description: // This procedure selects edge rings and loops // for selected edges. It takes the first two edges // that are selected, looks at the number of edges between // them on the ring/loop, and continues that pattern around // the full ring/loop. // // Input Arguments: // $method: the flag from the polySelect MEL command to use: // "edgeLoopPattern", "edgeRingPattern" or "edgeBorderPattern" // // Return Value: // None. global proc polySelectEdgesPattern(string $method) { string $edges[] = `getEdges`; int $size = `size $edges`; if ($size > 1) { string $buffer[]; tokenize $edges[0] "[]" $buffer; string $cmd = "polySelect -"; $cmd += $method; $cmd += " "; $cmd += $buffer[1]; tokenize $edges[1] "[]" $buffer; $cmd += " "; $cmd += $buffer[1]; eval($cmd); } }