// =========================================================================== // 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: // doImportFluidCacheArgList // // Description: // Import a cache file from disk and connect it to a fluid object // // Input Arguments: // $version: The version of this option box. Used to know how to // interpret the $args array. // // $args // Version 1 // - none // source doImportFluidCacheFile.mel; global proc int importFluidCacheFile(string $fileName, string $fileType) // // Import the specified file. // { string $fluidObjects[]; return doImportFluidCacheFile($fileName, $fileType, $fluidObjects, {}); } global proc doImportFluidCacheArgList( int $version, string $args[] ) { int $import = 1; verifyWorkspaceFileRule( "fluidCache", "cache/nCache/fluid" ); string $dataDir = cacheGetCurrentDir("fluidCache", "fluidCacheDirName", "CurrentProject", $import ); if (`file -q -ex $dataDir`) { workspace -dir $dataDir; } string $sel[] = `getFluidObjectsToCache 1`; // bring up the file browser dialog so that they can choose a file name // string $browserTitle = (uiRes("m_doImportFluidCacheArgList.kFluidImportCache")); fileBrowser("importFluidCacheFile", $browserTitle, "xmlcache", 0); }