// =========================================================================== // 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: 20 Feb 2002 // // Description: // Create Fluids Playback + Render cache // // global proc int fluidCacheSizeConfirm( int $cacheInKb ) { int $goAhead = true; int $warnThreshold = 1572864; // 1.5G if( $cacheInKb > $warnThreshold ) { float $cacheInGb = $cacheInKb / 1024.0 / 1024.0; // One decimal place is more friendly. // $cacheInGb = trunc( $cacheInGb * 10.0 ) / 10.0; string $title = (uiRes("m_fluidCacheSizeConfirm.kWarning")); string $continue = (uiRes("m_fluidCacheSizeConfirm.kContinue")); string $cancel = (uiRes("m_fluidCacheSizeConfirm.kCancel")); string $message = (uiRes("m_fluidCacheSizeConfirm.kCacheFilesMsg")); $message = `format -s $cacheInGb $message`; string $lastChance = `confirmDialog -title $title -message $message -messageAlign "left" -button $continue -button $cancel -defaultButton $continue -cancelButton $cancel -dismissString $cancel`; $goAhead = ( $lastChance == $continue ); } return $goAhead; }