// =========================================================================== // 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: // Delete Fluids Cache // // proc string clearFluidPBCache( string $fluid, int $deleteCacheFile ) { string $dskC; if(`connectionInfo -id ($fluid + ".diskCache")` > 0 ) { string $src = `connectionInfo -sfd ($fluid + ".diskCache")`; string $buffer[]; tokenize($src, ".", $buffer); $dskC = $buffer[0]; deleteFluidCache( $dskC, $deleteCacheFile ); } return $dskC; } proc clearActiveFluidPBCaches( int $deleteFile ) { string $fluidShapes[] = `getActiveFluidShapes`; for( $fluid in $fluidShapes ) { clearFluidPBCache( $fluid, $deleteFile ); } } global proc doDeleteFluidsPB( int $version, string $args[] ) // // Description: // // { if(( $version < 1 ) || ( size( $args ) < 1 )) { error(uiRes("m_doAppendHairCache.kIncorrectVersion")); return; } int $deleteFile_unused = $args[0]; // Make sure that we have a fluid selected // or warn the user and fail // string $fluidShapes[] = getActiveFluidShapes(); if( size($fluidShapes) == 0 ) { error((uiRes("m_doDeleteFluidsPB.kNoFluidsSelected"))); return; } clearActiveFluidPBCaches false; }