// =========================================================================== // 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 // // Description: // This is a helper script to perform the append cache depending on the object // type. // // // Procedure Name: // performAppendCache // // Description: // Perform the command using the corresponding // append cache command depending on the selected object to cache type. // // Input Arguments: // 0 - Execute the command. // 1 - Show the option box dialog. // 2 - Return the command. // // Return Value: // None. // global proc string performAppendCache(int $action) { string $fluObjs[] = getFluidObjectsToCache(0); // Don't show error string $nClothObjs[] = getNclothObjectsToCache(0); // Don't show error if ((size($fluObjs) > 0) && (size($nClothObjs) == 0)){ return performAppendFluidCache($action); } if ((size($nClothObjs) > 0) && (size($fluObjs) == 0)){ return performAppendNclothCache($action); } if ($action == 1) { error((uiRes("m_performAppendCache.kNeedObjectTypeForAppendCacheOptionError"))); } else{ error((uiRes("m_performAppendCache.kSelectObjectToCacheError"))); } return ""; }