// =========================================================================== // 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: 2005 // // Description: // Get a the default cache name for ncloth objects // // global proc string getAutomaticNclothCacheName() { string $objs[] = getNclothObjectsToCache(0); string $name = ""; if( size($objs) != 0 ) { $name = $objs[0]; // Strip away invalid characters such as dagPath separators "|" // and replace namespaces ":" with "_". // string $buffer[]; int $count = tokenize($name,"|",$buffer); $name = $buffer[$count-1]; $name = substituteAllString($name,":","_"); } return $name; }