// =========================================================================== // 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: Jan, 2005 // // Procedure Name: // doImportCacheArgList // // Description: // Import a cache file from disk and connect it to an object // // Input Arguments: // $version: The version of this option box. Used to know how to // interpret the $args array. // // $args // Version 1 // - none // source doImportCacheFile.mel; global proc int importCacheFile(string $fileName, string $fileType) // // Import the specified file. // { string $geometries[]; return doImportCacheFile($fileName, $fileType,$geometries,{}); } global proc doImportCacheArgList( int $version, string $args[] ) { int $import = 1; verifyWorkspaceFileRule( "fileCache", "cache/nCache" ); string $dataDir = cacheGetCurrentDir("fileCache", "geomCacheDirName", "CurrentProject", $import ); if (`file -q -ex $dataDir`) { workspace -dir $dataDir; } string $sel[] = `getGeometriesToCache`; if (0 == size($sel)) { error((uiRes("m_doImportCacheArgList.kNoGeometrySelected"))); } // bring up the file browser dialog so that they can choose a file name // string $browserTitle = (uiRes("m_doImportCacheArgList.kImportCache")); fileBrowser("importCacheFile",$browserTitle,"xmlcache",0); }