// =========================================================================== // 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. // =========================================================================== global proc createPolyCylinderProperties() { // Global template variables for form spacing global int $gToolOptionBoxTemplateDescriptionMarginWidth; global int $gToolOptionBoxTemplateFrameSpacing; string $parent = `toolPropertyWindow -q -location`; setParent $parent; setUITemplate -pushTemplate ToolOptionBoxTemplate; string $type = "createPolyCylinder"; string $title = (uiRes("m_createPolyCylinderProperties.kCreatePolyCylinderToolSettings")); string $axis = `upAxis -q -axis`; int $axisButton = 1; if ($axis == "z") $axisButton = 2; else $axisButton = 1; // Form layout $parent = `formLayout $type`; // Description frame string $descriptionFrame = `frameLayout -label (uiRes("m_createPolyCylinderProperties.kDescriptionPolyCylFrame")) -mw $gToolOptionBoxTemplateDescriptionMarginWidth`; text -label (uiRes("m_createPolyCylinderProperties.kCreatePolyCylinderToolDescApp")) createPolyCylinderToolDescLabel; setParent $parent; // Settings frame string $settingsFrame = `frameLayout -label (uiRes("m_createPolyCylinderProperties.kCreateSettingsFrame"))`; columnLayout; intSliderGrp -field true -l (uiRes("m_createPolyCylinderProperties.kAxisDivisions")) -min 1 -max 50 -fmx 10000 -v 1 createPolyCylinderAxisDivisionsSlider; intSliderGrp -field true -l (uiRes("m_createPolyCylinderProperties.kHeightDivisions")) -min 1 -max 50 -fmx 10000 -v 1 createPolyCylinderHeightDivisionsSlider; intSliderGrp -field true -l (uiRes("m_createPolyCylinderProperties.kCapDivisions")) -min 0 -max 50 -fmx 10000 -v 1 createPolyCylinderCapDivisionsSlider; checkBoxGrp -label1 (uiRes("m_createPolyCylinderProperties.kRoundCap")) -value1 false createPolyCylinderRoundCapCheckBox; checkBoxGrp -label1 (uiRes("m_createPolyCylinderProperties.kCreateUVs")) -label (uiRes("m_createPolyCylinderProperties.kTextureMapping")) -value1 true -enable true createPolyCylinderCreateUVCheckBox; checkBoxGrp -label1 (uiRes("m_createPolyCylinderProperties.kNormalize")) -value1 true -enable true createPolyCylinderNormalizeCheckBox; checkBoxGrp -label1 (uiRes("m_createPolyCylinderProperties.kPreserveAR")) -value1 true -enable true createPolyCylinderPreserveAspectRatioCheckBox; setParent $parent; string $adjustFrame = `frameLayout -label (uiRes("m_createPolyCylinderProperties.kAdjustmentAfterCreateSettings"))`; columnLayout; checkBoxGrp -label1 (uiRes("m_createPolyCylinderProperties.kDoDragEditLine")) -value1 false -enable true createPolyCylinderDragEditCheckBox; checkBoxGrp -label1 (uiRes("m_createPolyCylinderProperties.kDoDragEditCapsLine")) -value1 true -enable true createPolyCylinderCapsDragEditCheckBox; setParent $parent; // Single-click Settings frame string $singleClickSettingsFrame = `frameLayout -label (uiRes("m_createPolyCylinderProperties.kSettingsFrame"))`; columnLayout; floatSliderGrp -field true -l (uiRes("m_createPolyCylinderProperties.kRadius")) -min 0.01 -max 10.0 -v 1.0 -fieldMaxValue 1000 createPolyCylinderRadiusSlider; floatSliderGrp -field true -l (uiRes("m_createPolyCylinderProperties.kHeight")) -min 0.01 -max 10.0 -v 1.0 -fieldMaxValue 10000 createPolyCylinderHeightSlider; radioButtonGrp -label (uiRes("m_createPolyCylinderProperties.kAxis")) -numberOfRadioButtons 3 -label1 (uiRes("m_createPolyCylinderProperties.kXAxis")) -label2 (uiRes("m_createPolyCylinderProperties.kYAxis")) -label3 (uiRes("m_createPolyCylinderProperties.kZAxis")) -enable true -select $axisButton createPolyCylinderAxisRadioButton; setParent ..; // Attach Description/Settings frames to form layout formLayout -e -af $descriptionFrame "top" $gToolOptionBoxTemplateFrameSpacing -af $descriptionFrame "left" $gToolOptionBoxTemplateFrameSpacing -af $descriptionFrame "right" $gToolOptionBoxTemplateFrameSpacing -an $descriptionFrame "bottom" -ac $singleClickSettingsFrame "top" $gToolOptionBoxTemplateFrameSpacing $descriptionFrame -af $singleClickSettingsFrame "left" $gToolOptionBoxTemplateFrameSpacing -af $singleClickSettingsFrame "right" $gToolOptionBoxTemplateFrameSpacing -an $singleClickSettingsFrame "bottom" -ac $settingsFrame "top" $gToolOptionBoxTemplateFrameSpacing $singleClickSettingsFrame -af $settingsFrame "left" $gToolOptionBoxTemplateFrameSpacing -af $settingsFrame "right" $gToolOptionBoxTemplateFrameSpacing -an $settingsFrame "bottom" -ac $adjustFrame "top" $gToolOptionBoxTemplateFrameSpacing $settingsFrame -af $adjustFrame "left" $gToolOptionBoxTemplateFrameSpacing -af $adjustFrame "right" $gToolOptionBoxTemplateFrameSpacing -an $adjustFrame "bottom" $parent; setUITemplate -popTemplate; }