// =========================================================================== // 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: 18 April 1997 // // Description: // polyNextSelectionBatch // utility script for several poly action scripts. // global proc int polyNextSelectionBatch (string $in[], string $out[], int $start) { if ($start >= size($in)) { clear $in; return 1; } int $end=$start; int $cur=0; clear $out; string $curobj=$in[$end]; string $buf[2]; tokenize $curobj "." $buf; string $lastobj=$buf[0]; $out[$cur++]=$curobj; $end++; while ($end < size($in)) { $curobj = $in[$end]; tokenize $curobj "." $buf; if ($buf[0] == $lastobj) { $out[$cur++]=$curobj; $end++; } else break; } return $end; }