// =========================================================================== // 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: 2011 // // Description: // confirm that user really wants to create 2nd new cache, and not replace // global proc int cacheReplaceNotAdd( string $objsToCache[] ) // // Description: // Create cache files on disk for the select ncloth object(s) according // to the specified flags described below. { string $obj; int $replaceable = 0; if (getCacheCanBeReplaced($objsToCache)) { $replaceable = 1; for( $obj in $objsToCache ) { string $existing[] = findExistingCaches($obj); if(size($existing)!= 1) { $replaceable = 0; } } } if($replaceable) { string $title = (uiRes("m_cacheReplaceNotAdd.kTitle")); string $replace = (uiRes("m_cacheReplaceNotAdd.kReplace")); string $addAndBlend = (uiRes("m_cacheReplaceNotAdd.kAddAndBlend")); string $message = (uiRes("m_cacheReplaceNotAdd.kAddOrReplaceMessage")); string $doReplace = `confirmDialog -title $title -message $message -button $addAndBlend -button $replace -defaultButton $addAndBlend -cancelButton $addAndBlend -dismissString $addAndBlend`; if( $doReplace != $replace) { $replaceable = 0; } } return $replaceable; }