// =========================================================================== // 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: Jun 2014 // // // Procedure Name: // DynFluidsMenu // // Description: // Create the DYNAMICS->nCache // // Input Arguments: // parent to parent the menu to. // // Return Value: // None. // proc DynNCacheLegacyMenuItems() { menuItem -divider true -l (uiRes("m_NucleusCacheMenu.kLegacyCache")); string $cmd = "CreateParticleDiskCache"; menuItem -rtc $cmd -dragMenuCommand "performDynamics 0 ParticleRenderCache 2" particleRenderCacheItem; $cmd = "CreateParticleDiskCacheOptions"; menuItem -optionBox true -rtc $cmd particleRenderCacheDialogItem; $cmd = "EditOversamplingForCacheSettings"; menuItem -rtc $cmd editOversampling; // Memory Caching sub menu // menuItem -label (uiRes("m_NucleusCacheMenu.kMemoryCaching")) -subMenu true sceneCaching; $cmd = "EnableMemoryCaching"; menuItem -rtc $cmd enableCaching; $cmd = "DisableMemoryCaching"; menuItem -rtc $cmd disableCaching; $cmd = "DeleteMemoryCaching"; menuItem -rtc $cmd deleteCache; setParent -menu ..; } global proc NucleusCacheMenu ( string $parent ) { setParent -menu $parent; if( `menu -q -ni $parent` != 0 ) { // // Menu is built already - just return // return; } // Cache menu // menuItem -divider true -dividerLabel (uiRes("m_NucleusCacheMenu.kNCacheCreate")); // Create New Cache sub-menu menuItem -l (uiRes("m_NucleusCacheMenu.kCreateCache")) -sm true -to true; menuItem -rtc "nClothCache" -dmc "performCreateNclothCache 2 0" nClothCacheItem; menuItem -optionBox true -rtc "nClothCacheOpt" nClothCacheOptItem; menuItem -rtc "CreateFluidCache" -dragMenuCommand "performCreateFluidCache 2 0" -dragDoubleClickCommand "CreateFluidCacheOptions"; menuItem -optionBox true -rtc "CreateFluidCacheOptions"; setParent -m ..; menuItem -l (uiRes("m_NucleusCacheMenu.kMergeCache")) -sm true -to true; menuItem -rtc "nClothMergeCache" -dmc "performCreateNclothCache 2 \"merge\"" -dragDoubleClickCommand "nClothMergeCacheOpt" nClothMergeCacheItem; menuItem -optionBox true -rtc "nClothMergeCacheOpt" nClothMergeCacheOptItem; menuItem -rtc "fluidMergeCache" -dragMenuCommand "performCreateFluidCache 2 \"merge\"" -dragDoubleClickCommand "fluidMergeCacheOpt" fluidMergeCacheItem; menuItem -optionBox true -rtc "fluidMergeCacheOpt" fluidMergeCacheOptItem; setParent -m ..; menuItem -l (uiRes("m_NucleusCacheMenu.kReplaceCache")) -sm true -to true; menuItem -rtc "nClothReplaceCache" -dmc "performCreateNclothCache 2 \"replace\"" -dragDoubleClickCommand "nClothReplaceCacheOpt" nClothReplaceCacheItem; menuItem -optionBox true -rtc "nClothReplaceCacheOpt" nClothReplaceCacheOptItem; menuItem -rtc "fluidReplaceCache" -dragMenuCommand "performCreateFluidCache 2 \"replace\"" -dragDoubleClickCommand "fluidReplaceCacheOpt" fluidReplaceCacheItem; menuItem -optionBox true -rtc "fluidReplaceCacheOpt" fluidReplaceCacheOptItem; setParent -m ..; menuItem -rtc "EnableAllCaches" enableAllNclothCacheItem; menuItem -rtc "DisableAllCaches" disableAllNclothCacheItem; menuItem -divider true -dividerLabel (uiRes("m_NucleusCacheMenu.kCacheEdit")); menuItem -rtc "cacheAppend" -dmc "performAppendCache 2" cacheAppendCacheItem; menuItem -optionBox true -rtc "cacheAppendOpt" cacheAppendOptItem; menuItem -rtc "attachCache" attachCacheItem; // Here we use fluidDeleteCache, but it actually calls deleteCacheFile // which can delete both nCloth and fluid types. menuItem -rtc "fluidDeleteCache" deleteCacheItem; menuItem -optionBox true -rtc "fluidDeleteCacheOpt" deleteCacheOptItem; menuItem -divider true -dividerLabel (uiRes("m_NucleusCacheMenu.kCacheFrame")); menuItem -rtc "replaceCacheFrames" -dmc "performReplaceCacheFrames 2" replaceCacheFramesItem; menuItem -optionBox true -rtc "replaceCacheFramesOpt" replaceCacheFramesOptItem; // Here we use fluidDeleteCacheFrames, but it actually calls deleteCacheFile // which can delete both nCloth and fluid types. menuItem -rtc "fluidDeleteCacheFrames" -dmc "performDeleteFluidCacheFrames 2" deleteCacheFramesItem; menuItem -optionBox true -rtc "fluidDeleteCacheFramesOpt" deleteCacheFramesOptItem; menuItem -divider true -dividerLabel (uiRes("m_NucleusCacheMenu.kCacheNCloth")); menuItem -rtc "PaintCacheTool" nclothPaintCacheItem; menuItem -optionBox true -rtc "PaintCacheToolOptions" nClothPaintCacheOptItem; menuItem -rtc "MoveCacheToInput" nClothMoveCacheToInputItem; // Legacy Cache if(`getenv "MAYA_ENABLE_LEGACY_PARTICLES"` !="0") { DynNCacheLegacyMenuItems; } }