// =========================================================================== // 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 shelf. // global proc shelf_FX() { string $label; string $annot; string $format = "^1s: ^2s"; // for Dynamics $label = (uiRes("m_shelf_FX.kEmitter")) ; $annot = getRunTimeCommandAnnotation("NCreateEmitter") ; shelfButton -label $label -annotation `format -s $label -s $annot $format` -image1 "posEmitter.png" -command ("NCreateEmitter") -doubleClickCommand ("NCreateEmitterOptions"); $label = (uiRes("m_shelf_FX.kAddEmitter")) ; $annot = getRunTimeCommandAnnotation("NEmitFromObject") ; shelfButton -label $label -annotation `format -s $label -s $annot $format` -image1 "emitter.png" -command ("NEmitFromObject") -doubleClickCommand ("NEmitFromObjectOptions"); // Fluids, nHair, nCloth // addShelfSeparator(); // for Fluids $label = (uiRes("m_shelf_FX.kFluidContainerWithEmitter3D")) ; $annot = getRunTimeCommandAnnotation("Create3DContainerEmitter") ; shelfButton -label $label -annotation `format -s $label -s $annot $format` -image1 "fluidCreate3D.png" -command ("Create3DContainerEmitter") -doubleClickCommand ("Create3DContainerEmitterOptions"); $label = (uiRes("m_shelf_FX.kFluidContainerWithEmitter2D")) ; $annot = getRunTimeCommandAnnotation("Create2DContainerEmitter") ; shelfButton -label $label -annotation `format -s $label -s $annot $format` -image1 "fluidCreate2D.png" -command ("Create2DContainerEmitter") -doubleClickCommand ("Create2DContainerEmitterOptions"); $label = (uiRes("m_shelf_FX.kEmitFluidFromObject")) ; $annot = getRunTimeCommandAnnotation("EmitFluidFromObject") ; shelfButton -label $label -annotation `format -s $label -s $annot $format` -image1 "fluidObjectEmit.png" -command ("EmitFluidFromObject") -doubleClickCommand ("EmitFluidFromObjectOptions"); $label = (uiRes("m_shelf_FX.kMakeCollide")) ; $annot = getRunTimeCommandAnnotation("MakeFluidCollide") ; shelfButton -label $label -annotation `format -s $label -s $annot $format` -image1 "fluidCollide.png" -command ("MakeFluidCollide") -doubleClickCommand ("MakeFluidCollideOptions"); addShelfSeparator(); // for nHair $label = (uiRes("m_shelf_FX.kCreateHair")) ; $annot = getRunTimeCommandAnnotation("CreateHairOptions") ; shelfButton -label $label -annotation `format -s $label -s $annot $format` -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -image "hairCreate.png" -image1 "hairCreate.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "CreateHairOptions" ; shelfButton -label (uiRes("m_shelf_FX.kPaintHairToolOptions")) -annotation (uiRes("m_shelf_FX.kPaintHairToolOptionBoxAnnot")) -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -image "hairPaint.png" -image1 "hairPaint.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "paintHairTool 1" ; $label = (uiRes("m_shelf_FX.kMakeSelectedCurvesDynamic")) ; $annot = getRunTimeCommandAnnotation("MakeCurvesDynamic") ; shelfButton -label $label -annotation `format -s $label -s $annot $format` -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -image "hairDynamicCurves.png" -image1 "hairDynamicCurves.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "MakeCurvesDynamic" ; shelfButton -label (uiRes("m_shelf_FX.kCurrentPosition")) -annotation (uiRes("m_shelf_FX.kCurrentPositionAnnot")) -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -image "hairDisplayCurrent.png" -image1 "hairDisplayCurrent.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "displayHairCurves \"current\" 1" ; shelfButton -label (uiRes("m_shelf_FX.kStartPosition")) -annotation (uiRes("m_shelf_FX.kStartPositionAnnot")) -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -image "hairDisplayStart.png" -image1 "hairDisplayStart.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "displayHairCurves \"start\" 1" ; shelfButton -label (uiRes("m_shelf_FX.kRestPosition")) -annotation (uiRes("m_shelf_FX.kRestPositionAnnot")) -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -image "hairDisplayRest.png" -image1 "hairDisplayRest.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "displayHairCurves \"rest\" 1" ; shelfButton -label (uiRes("m_shelf_FX.kToHairSystems")) -annotation (uiRes("m_shelf_FX.kToHairSystemsAnnot")) -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -image "hairConvertHairSystem.png" -image1 "hairConvertHairSystem.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "convertHairSelection \"hairSystems\"" ; shelfButton -label (uiRes("m_shelf_FX.kToFollicles")) -annotation (uiRes("m_shelf_FX.kToFolliclesAnnot")) -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -image "hairConvertFollicles.png" -image1 "hairConvertFollicles.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "convertHairSelection \"follicles\"" ; shelfButton -label (uiRes("m_shelf_FX.kToStartCurves")) -annotation (uiRes("m_shelf_FX.kToStartCurvesAnnot")) -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -image "hairConvertStart.png" -image1 "hairConvertStart.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "convertHairSelection \"startCurves\"" ; shelfButton -label (uiRes("m_shelf_FX.kToRestCurves")) -annotation (uiRes("m_shelf_FX.kToRestCurvesAnnot")) -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -image "hairConvertRest.png" -image1 "hairConvertRest.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "convertHairSelection \"restCurves\"" ; shelfButton -label (uiRes("m_shelf_FX.kScaleHairTool")) -annotation (uiRes("m_shelf_FX.kScaleHairToolAnnot")) -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -image "hairScaleTool.png" -image1 "hairScaleTool.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "scaleHairCtx" ; shelfButton -label (uiRes("m_shelf_FX.kToStartCurveEndCVs")) -annotation (uiRes("m_shelf_FX.kToStartCurveEndCVsAnnot")) -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -image "hairConvertStartEndCVs.png" -image1 "hairConvertStartEndCVs.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "convertHairSelection \"startCurveEndCvs\"\r\n" ; shelfButton -label (uiRes("m_shelf_FX.kToRestCurveEndCVs")) -annotation (uiRes("m_shelf_FX.kToRestCurveEndCVsAnnot")) -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -image "hairConvertRestEndCVs.png" -image1 "hairConvertRestEndCVs.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "convertHairSelection \"restCurveEndCvs\"\r\n" ; shelfButton -label (uiRes("m_shelf_FX.kFromCurrent")) -annotation (uiRes("m_shelf_FX.kFromCurrentAnnot")) -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -image "hairStartFromCurrent.png" -image1 "hairStartFromCurrent.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "setSelectedHairCurves \"current\" \"start\"" ; shelfButton -label (uiRes("m_shelf_FX.kCurrentAndStart")) -annotation (uiRes("m_shelf_FX.kCurrentAndStartAnnot")) -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -image "hairDisplayCurrentStart.png" -image1 "hairDisplayCurrentStart.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "displayHairCurves \"currentAndStart\" 1" ; shelfButton -label (uiRes("m_shelf_FX.kFromCurrentRest")) -annotation (uiRes("m_shelf_FX.kFromCurrentRestAnnot")) -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -image "hairRestFromCurrent.png" -image1 "hairRestFromCurrent.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "setSelectedHairCurves \"current\" \"rest\"" ; shelfButton -label (uiRes("m_shelf_FX.kCurrentAndRest")) -annotation (uiRes("m_shelf_FX.kCurrentAndRestAnnot")) -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -image "hairDisplayCurrentRest.png" -image1 "hairDisplayCurrentRest.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "displayHairCurves \"currentAndRest\" 1" ; addShelfSeparator(); // for nCloth shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -preventOverride 0 -annotation (getRunTimeCommandAnnotation("nClothCreate")) -align "center" -label (uiRes("m_shelf_FX.kCreateNcloth")) -labelOffset 0 -font "tinyBoldLabelFont" -image "nClothCreate.png" -image1 "nClothCreate.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "doCreateNCloth 0" -sourceType "mel" -doubleClickCommand "nClothCreateOptions" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -preventOverride 0 -annotation (getRunTimeCommandAnnotation("nClothMakeCollide")) -align "center" -label (uiRes("m_shelf_FX.kCreatePassive")) -labelOffset 0 -font "tinyBoldLabelFont" -image "nClothCreatePassive.png" -image1 "nClothCreatePassive.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "makeCollideNCloth" -sourceType "mel" -doubleClickCommand "nClothMakeCollideOptions" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -preventOverride 0 -annotation (getRunTimeCommandAnnotation("nClothRemove")) -align "center" -label (uiRes("m_shelf_FX.kRemoveNcloth")) -labelOffset 0 -font "tinyBoldLabelFont" -image "nClothRemove.png" -image1 "nClothRemove.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "removeNCloth \"selected\"" -sourceType "mel" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -preventOverride 0 -annotation (uiRes("m_shelf_FX.kDisplayInputMesh")) -align "center" -label (uiRes("m_shelf_FX.kInputMesh")) -labelOffset 0 -font "tinyBoldLabelFont" -image "nClothDisplayInput.png" -image1 "nClothDisplayInput.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "displayNClothMesh \"input\"" -sourceType "mel" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -preventOverride 0 -annotation (uiRes("m_shelf_FX.kDisplayCurrentMesh")) -align "center" -label (uiRes("m_shelf_FX.kCurrentMesh")) -labelOffset 0 -font "tinyBoldLabelFont" -image "nClothDisplayCurrent.png" -image1 "nClothDisplayCurrent.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "displayNClothMesh \"current\"" -sourceType "mel" ; addShelfSeparator(); shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -preventOverride 0 -annotation (uiRes("m_shelf_FX.kStartInteractivePlayback")) -align "center" -label (uiRes("m_shelf_FX.kInteractivePlayback")) -labelOffset 0 -font "tinyBoldLabelFont" -image "interactivePlayback.png" -image1 "interactivePlayback.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "InteractivePlayback" -sourceType "mel" ; }