// =========================================================================== // 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: December 2014 // // Description: // Define the FX Caching shelf. // global proc shelf_FXCaching() { // These items(Fluids, nHair, nCloth) are only available in Maya Unlimited. // string $label; string $annot; string $format = "^1s: ^2s"; // for Fluids $label = (uiRes("m_shelf_FXCaching.kSetInitialState")) ; $annot = getRunTimeCommandAnnotation("SetInitialState") ; shelfButton -label $label -annotation `format -s $label -s $annot $format` -image1 "fluidInitialStateSet.png" -command ("SetInitialState"); $label = (uiRes("m_shelf_FXCaching.kClearInitialState")) ; $annot = getRunTimeCommandAnnotation("ClearInitialState") ; shelfButton -label $label -annotation `format -s $label -s $annot $format` -image1 "fluidInitialStateClear.png" -command ("ClearInitialState"); addShelfSeparator(); $label = (uiRes("m_shelf_FXCaching.kCreateCache")) ; $annot = getRunTimeCommandAnnotation("CreateFluidCache") ; shelfButton -label $label -annotation `format -s $label -s $annot $format` -image1 "fluidCacheCreate.png" -command ("CreateFluidCache") -doubleClickCommand ("CreateFluidCacheOptions"); $label = (uiRes("m_shelf_FXCaching.kDeleteCache")) ; $annot = getRunTimeCommandAnnotation("fluidDeleteCache") ; shelfButton -label $label -annotation `format -s $label -s $annot $format` -image1 "fluidCacheDelete.png" -command ("fluidDeleteCache") -doubleClickCommand ("fluidDeleteCacheOpt"); addShelfSeparator(); // for nHair and nCloth shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -preventOverride 0 -annotation (getRunTimeCommandAnnotation("nClothCache")) -align "center" -label (uiRes("m_shelf_FXCaching.kCreateNclothCache")) -labelOffset 0 -font "tinyBoldLabelFont" -image "nClothCacheCreate.png" -image1 "nClothCacheCreate.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "doCreateNclothCache 4 { \"2\", \"1\", \"10\", \"OneFilePerFrame\", \"1\", \"\",\"1\",\"\",\"0\", \"0\", \"0\", \"1\", \"1\",\"0\",\"1\" } " -sourceType "mel" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -preventOverride 0 -annotation (getRunTimeCommandAnnotation("deleteNclothCache")) -align "center" -label (uiRes("m_shelf_FXCaching.kDeleteNclothCache")) -labelOffset 0 -font "tinyBoldLabelFont" -image "nClothCacheDelete.png" -image1 "nClothCacheDelete.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "deleteNclothCache" -sourceType "mel" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -preventOverride 0 -align "center" -label (uiRes("m_shelf_FXCaching.kEnableAllCache")) -annotation (uiRes("m_shelf_FXCaching.kEnableAllCacheAnnot")) -labelOffset 0 -font "tinyBoldLabelFont" -image "nClothCacheEnable.png" -image1 "nClothCacheEnable.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "setCacheEnable 1 0 {}" -sourceType "mel" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -preventOverride 0 -align "center" -label (uiRes("m_shelf_FXCaching.kDisableAllCache")) -annotation (uiRes("m_shelf_FXCaching.kDisableAllCacheAnnot")) -labelOffset 0 -font "tinyBoldLabelFont" -image "nClothCacheDisable.png" -image1 "nClothCacheDisable.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "setCacheEnable 0 0 {}" -sourceType "mel" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -preventOverride 0 -annotation (getRunTimeCommandAnnotation("nClothMergeCache")) -align "center" -label (uiRes("m_shelf_FXCaching.kMergeCache")) -labelOffset 0 -font "tinyBoldLabelFont" -image "nClothCacheMerge.png" -image1 "nClothCacheMerge.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "doCreateNclothCache 4 { \"2\", \"1\", \"10\", \"OneFilePerFrame\", \"1\", \"\",\"1\",\"\",\"0\", \"merge\", \"0\", \"1\", \"1\",\"0\",\"1\" } " -sourceType "mel" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -preventOverride 0 -annotation (getRunTimeCommandAnnotation("nClothReplaceFrames")) -align "center" -label (uiRes("m_shelf_FXCaching.kReplaceCacheFrames")) -labelOffset 0 -font "tinyBoldLabelFont" -image "nClothCacheReplaceFrames.png" -image1 "nClothCacheReplaceFrames.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "doReplaceNclothCacheFrames 1 1 10 0 1 0 0 \"linear\" \"linear\" \"\" 1 1 0" -sourceType "mel" ; }