// =========================================================================== // 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. // =========================================================================== // // This script creates the controls for polygon select edit tool property sheet. // proc polyDuplicateEdgeProperties() { string $parent = `toolPropertyWindow -q -location`; setParent $parent; setUITemplate -pushTemplate OptionsTemplate; string $type = "polySelectEdit"; string $title = (uiRes("m_polySelectEditProperties.kDuplicateEdgeLoopToolSettings")); columnLayout -adj true $type; separator -style "none"; text -l (uiRes("m_polySelectEditProperties.kNoSettingsDefinedForTool")) -align left text1; setParent ..; setUITemplate -popTemplate; } proc polySplitRingProperties() { // Global template variables for form spacing global int $gToolOptionBoxTemplateDescriptionMarginWidth; global int $gToolOptionBoxTemplateFrameSpacing; string $parent = `toolPropertyWindow -q -location`; setParent $parent; setUITemplate -pushTemplate ToolOptionBoxTemplate; string $type = "polySelectEdit"; string $title = (uiRes("m_polySelectEditProperties.kInsertEdgeLoopToolSettings")); // Form layout $parent = `formLayout $type`; // Description frame string $descriptionFrame = `frameLayout -label (uiRes("m_polySelectEditProperties.kDescriptionFrame")) -mw $gToolOptionBoxTemplateDescriptionMarginWidth`; text -label (uiRes("m_polySelectEditProperties.kPolySplitRingToolDescApp")) polySplitRingToolLabel; setParent $parent; // Settings frame string $settingsFrame = `frameLayout -label (uiRes("m_polySelectEditProperties.kSettingsFrame"))`; columnLayout; radioButtonGrp -l (uiRes("m_polySelectEditProperties.kMaintainPosition")) -numberOfRadioButtons 3 -label1 (uiRes("m_polySelectEditProperties.kRelDistance")) -label2 (uiRes("m_polySelectEditProperties.kEqDistance")) -label3 (uiRes("m_polySelectEditProperties.kMultiLoops")) -vertical selectEditSplitTypeRadio; checkBoxGrp -label "" -label1 (uiRes("m_polySelectEditProperties.kUseEqualMultiplier")) selectEditUseEqualMultiplierCheckBox; intSliderGrp -field true -l (uiRes("m_polySelectEditProperties.kDivisions")) -min 0 -max 50 -v 0 selectEditSplitDivisionsSlider; checkBoxGrp -label "" -label1 (uiRes("m_polySelectEditProperties.kAutoComplete")) selectEditAutoCompleteCheckBox; checkBoxGrp -label "" -label1 (uiRes("m_polySelectEditProperties.kFixQuads")) selectEditFixQuadsCheckBox; checkBoxGrp -label "" -label1 (uiRes("m_polySelectEditProperties.kInsertWithEdgeFlow")) selectEditInsertWithEdgeFlowCheckBox; floatSliderGrp -field true -l (uiRes("m_polySelectEditProperties.kAdjustEdgeFlow")) -min 0.0 -max 1.0 -v 1.0 -fieldMinValue -1000000 -fieldMaxValue 1000000 selectEditAdjustEdgeFlowSlider; floatSliderGrp -field true -l (uiRes("m_polySelectEditProperties.kSmoothingAngle")) -min 0.0 -max 180.0 -v 180.0 selectEditSmoothAngleSlider; setParent $parent; 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 $settingsFrame "top" $gToolOptionBoxTemplateFrameSpacing $descriptionFrame -af $settingsFrame "left" $gToolOptionBoxTemplateFrameSpacing -af $settingsFrame "right" $gToolOptionBoxTemplateFrameSpacing -an $settingsFrame "bottom" $parent; setUITemplate -popTemplate; } global proc polySelectEditProperties() { if (`polySelectEditCtx -q -mode polySelectEditContext`) { polySplitRingProperties(); } else { polyDuplicateEdgeProperties(); } }