// =========================================================================== // 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: Nov, 2014 // // Procedure Name: // doAttachCacheArgList // // Description: // Attach a cache file from disk and connect it to an object. // This script is used to call either importFluidCacheFile or // importCacheFile depending on the selected object type. // // Input Arguments: // $version: The version of this option box. Used to know how to // interpret the $args array. // // $args // Version 1 // - none // source doImportFluidCacheArgList.mel; source doImportCacheArgList.mel; global proc doAttachCacheArgList( int $version, string $args[] ) { // See if we have selected fluid objects. string $fluSel[] = `getFluidObjectsToCache 0`; // Don't error out if there is no fluid object selected. string $geoSel[] = `getGeometriesToCache`; string $geoOnlySel[] = stringArrayRemove($fluSel, $geoSel); // If there is fluid object, let's only import fluid cache. if ((size($fluSel) > 0) && (size($geoOnlySel) == 0)){ doImportFluidCacheArgList(0, {}); return; } if ((size($geoOnlySel) > 0) && (size($fluSel) == 0)){ doImportCacheArgList(0, {}); return; } error((uiRes("m_doAttachCacheArgList.kNoFluidGeometrySelected"))); }