// =========================================================================== // 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: 2006 // // Description: // Given a list of objects returned by getObjectsByCacheGroup // and a starting index, return the index of the last object // in the next group. // global proc int getNextCacheGroup(string $list[],int $currIndex) { global string $gCacheGroupSeparator; int $ii = $currIndex; int $foundItem = -1; for ( ; $ii < size($list); $ii++) { // cache groups are separated by $gCacheGroupSeparator // if ($list[$ii] != $gCacheGroupSeparator) { $foundItem = $ii; } else if ($foundItem >= 0) { break; } } return $foundItem+1; }