// =========================================================================== // 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 proc points the tool properties //# window to the current polySelectEdit context proc polyDuplicateEdgeValues( string $toolName ) { } proc polySplitRingValues ( string $toolName ) { string $name = "polySelectEdit"; string $parent = (`toolPropertyWindow -q -location` + "|" + $name); setParent $parent; int $splitType = `polySelectEditCtx -q -splitType $toolName`; if( 0 == $splitType ) radioButtonGrp -e -sl 2 selectEditSplitTypeRadio; else if (1 == $splitType) radioButtonGrp -e -sl 1 selectEditSplitTypeRadio; else radioButtonGrp -e -sl 3 selectEditSplitTypeRadio; int $auto = `polySelectEditCtx -q -ac $toolName`; checkBoxGrp -e -v1 $auto selectEditAutoCompleteCheckBox; int $equalMult = `polySelectEditCtx -q -uem $toolName`; checkBoxGrp -e -v1 $equalMult selectEditUseEqualMultiplierCheckBox; int $fixQuads = `polySelectEditCtx -q -fq $toolName`; checkBoxGrp -e -v1 $fixQuads selectEditFixQuadsCheckBox; radioButtonGrp -e -on1 ("polySelectEditCtx -e -splitType 1 " + $toolName + "; intSliderGrp -e -enable 0 selectEditSplitDivisionsSlider" + "; checkBoxGrp -e -enable 0 selectEditUseEqualMultiplierCheckBox") -on2 ("polySelectEditCtx -e -splitType 0 " + $toolName + "; intSliderGrp -e -enable 0 selectEditSplitDivisionsSlider" + "; checkBoxGrp -e -enable 0 selectEditUseEqualMultiplierCheckBox") -on3 ("polySelectEditCtx -e -splitType 2 " + $toolName + "; intSliderGrp -e -enable 1 selectEditSplitDivisionsSlider" + "; checkBoxGrp -e -enable 1 selectEditUseEqualMultiplierCheckBox") selectEditSplitTypeRadio; int $div = `polySelectEditCtx -q -divisions $toolName`; intSliderGrp -e -value $div -enable (2 == $splitType) -changeCommand ("polySelectEditCtx -e -div #1 " + $toolName) selectEditSplitDivisionsSlider; checkBoxGrp -e -changeCommand1 ("polySelectEditCtx -e -ac \ (`checkBoxGrp -q -v1 selectEditAutoCompleteCheckBox`)" + $toolName ) selectEditAutoCompleteCheckBox; checkBoxGrp -e -enable (2 == $splitType) -changeCommand1 ("polySelectEditCtx -e -uem \ (`checkBoxGrp -q -v1 selectEditUseEqualMultiplierCheckBox`)" + $toolName ) selectEditUseEqualMultiplierCheckBox; checkBoxGrp -e -changeCommand1 ("polySelectEditCtx -e -fq \ (`checkBoxGrp -q -v1 selectEditFixQuadsCheckBox`)" + $toolName ) selectEditFixQuadsCheckBox; int $insertWithEdgeFlow = `polySelectEditCtx -q -ief $toolName`; checkBoxGrp -e -enable (2 != $splitType) -value1 $insertWithEdgeFlow -changeCommand1 ("polySelectEditCtx -e -ief \ (`checkBoxGrp -q -value1 selectEditInsertWithEdgeFlowCheckBox`)" + $toolName ) selectEditInsertWithEdgeFlowCheckBox; floatSliderGrp -e -enable (2 != $splitType && $insertWithEdgeFlow) -value `polySelectEditCtx -q -aef $toolName` -changeCommand ("polySelectEditCtx -e -aef #1 " + $toolName) selectEditAdjustEdgeFlowSlider; floatSliderGrp -e -value `polySelectEditCtx -q -sma $toolName` -changeCommand ("polySelectEditCtx -e -sma #1 " + $toolName) selectEditSmoothAngleSlider; string $icon = "polySelectEdgeRing.png"; string $helpTag= "SelectEditPolygonTool"; toolPropertySetCommon $toolName $icon $helpTag; toolPropertySelect $name; } global proc polySelectEditValues ( string $toolName ) { if (`polySelectEditCtx -q -mode $toolName`) { polySplitRingValues($toolName); } else { polyDuplicateEdgeValues($toolName); } }