// =========================================================================== // 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. // =========================================================================== // "Create Particle Grid"/ dynParticleProperties.mel // This script creates the controls for a Dynamics particle tool // property sheet. // The values for the property sheet are set in the file // dynParticleValues.mel // global proc dynParticleProperties () { // These globals contain the lowest min and highest max for the // dynamics float fields. // global float $gDynMaxFloatField; global float $gDynMinFloatField; // Do the layout for the Particle Create Tool's Property Sheet // string $parent = `toolPropertyWindow -q -location`; setUITemplate -pushTemplate OptionsTemplate; setParent $parent; columnLayout dynParticle; frameLayout -collapsable true -collapse false -label (uiRes("m_dynParticleProperties.kParticleSettings")) dynParticleFrame; columnLayout dynParticleOptions; separator -style "none"; // Create the widgets/controls. // textFieldGrp -label (uiRes("m_dynParticleProperties.kParticleName")) particleName; if( exists( "nucleusSolverButton") ){ nucleusSolverButton("particleToolNucleusMenu"); } floatSliderGrp -field true -label (uiRes("m_dynParticleProperties.kConserve")) -min 0 -max 1 -pre 3 -step 0.1 particleConserve; separator; intSliderGrp -field true -label (uiRes("m_dynParticleProperties.kNumberOfParticles")) -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -step 1 pNumJitters; floatSliderGrp -field true -label (uiRes("m_dynParticleProperties.kMaximumRadius")) -min 0 -max 30 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step .1 pJitterRadius; separator; // Sketch Widgets // checkBoxGrp -label "" -ncb 1 -label1 (uiRes("m_dynParticleProperties.kSketchParticles")) particleSketch; intSliderGrp -field true -label (uiRes("m_dynParticleProperties.kSketchInterval")) -enable false -min 0 -max 100 -fmn 0 -fmx $gDynMaxFloatField -step 1 sketchInterval; separator dynParticleSep3; // Grid Widgets // checkBoxGrp -label "" -ncb 1 -label1 (uiRes("m_dynParticleProperties.kCreateParticleGrid")) particleGrid; floatSliderGrp -field true -label (uiRes("m_dynParticleProperties.kParticleSpacing")) -enable false -min 0 -max 10 -fmn 0 -fmx $gDynMaxFloatField -pre 3 -step 0.5 pGridSpacing; radioButtonGrp -label (uiRes("m_dynParticleProperties.kPlacement")) -nrb 1 -label1 (uiRes("m_dynParticleProperties.kWithCursor")) -on1 "dynParticleCtx -e -tpD `window -q -label toolProperties`; dynEnableGridPositions(false)" pGridPlacement1; radioButtonGrp -label "" -nrb 1 -scl pGridPlacement1 -label1 (uiRes("m_dynParticleProperties.kWithTextFields")) -on1 "dynParticleCtx -e -tpD `window -q -label toolProperties`; dynEnableGridPositions(true)" pGridPlacement2; separator -style "none"; rowLayout -nc 2; text -al right -label (uiRes("m_dynParticleProperties.kMinimumCorner")) ; text -label ""; setParent ..; string $x = (uiRes("m_dynParticleProperties.kX")); string $y = (uiRes("m_dynParticleProperties.kY")); string $z = (uiRes("m_dynParticleProperties.kZ")); floatSliderGrp -field true -label $x -min -100 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 5 pGridLLX; floatSliderGrp -field true -label $y -min -100 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 5 pGridLLY; floatSliderGrp -field true -label $z -min -100 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 5 pGridLLZ; separator -style "none"; rowLayout -nc 2; text -al right -label (uiRes("m_dynParticleProperties.kMaximumCorner")) ; text -label ""; setParent ..; floatSliderGrp -field true -label $x -min -100 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 5 pGridURX; floatSliderGrp -field true -label $y -min -100 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 5 pGridURY; floatSliderGrp -field true -label $z -min -100 -max 100 -fmn $gDynMinFloatField -fmx $gDynMaxFloatField -pre 3 -step 5 pGridURZ; setParent ..; // columnLayout dynParticleOptions setParent ..; // frameLayout dynParticleFrame setParent ..; // columnLayout dynParticle setUITemplate -popTemplate; }