// =========================================================================== // 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: Nov 23rd, 1998 // // Description: // These procs create the controls for round tool property sheet. // See also roundCRValues.mel for procs that set the state of the // property sheet. // // Input Arguments: // None. // // Return Value: // None. // proc roundContextOptions( string $parent ) // // Description: // Adds the control for radius. This is a slider with units // { setParent $parent; setUITemplate -pushTemplate OptionsTemplate; floatSliderGrp -field on -ss 0.1 -min 0.0001 -max 5.0 -fmn 0.00001 -fmx 100.0 -label (uiRes("m_roundCRProperties.kRadius")) radiusSlider; floatSliderGrp -e -cc ("roundCRCtx -e -radiusToUse #1 `currentCtx`") radiusSlider ; setUITemplate -popTemplate; } proc roundToleranceProperties( string $parent, string $node ) { setParent $parent; setUITemplate -pushTemplate OptionsTemplate; radioButtonGrp -nrb 2 -label (uiRes("m_roundCRProperties.kToleranceValue")) -label1 (uiRes("m_roundCRProperties.kUsePreferences")) -label2 (uiRes("m_roundCRProperties.kOverride")) -select 1 commonToleranceOptions; floatSliderGrp -label (uiRes("m_roundCRProperties.kPositional")) -min 0.0001 -max 1.0 -fmn 0.00001 -fmx 1000.0 commonPositionalTolerance; setUITemplate -popTemplate; } global proc roundCRProperties() // // Description: // This procedure builds the property sheet and assigns callbacks to // its controls. The state of the controls are set in roundCRValues(). // { string $parent = `toolPropertyWindow -q -location`; string $curctx = `currentCtx`; string $node = `roundCRCtx -q -tnq $curctx`; setUITemplate -pushTemplate OptionsTemplate; setParent $parent; columnLayout -adj true roundCR; frameLayout -label (uiRes("m_roundCRProperties.kRoundSettings")) -borderVisible true -collapse false; columnLayout -adj true; separator -style "none"; $parent = `setParent -query`; // Show the Radius option here // roundContextOptions( $parent ); // Show the tolerance options here. // roundToleranceProperties ( $parent, $node ); setParent ..; setParent ..; // frameLayout setParent ..; // columnLayout // Connect the "Global vs. Local" tolerance radio button // to the appropriate round context command // radioButtonGrp -e -on1 ("floatSliderGrp -e -enable false commonPositionalTolerance; roundCRCtx -e -ugt on `currentCtx`") -on2 ("floatSliderGrp -e -enable true commonPositionalTolerance;roundCRCtx -e -ugt off `currentCtx`") commonToleranceOptions ; // Select the proper button in the "Global vs. Local" tolerance // radio button group. Also force display of the tolerance sliders // if Local tolerance is being used. // int $useLocalTolerance = (`roundCRCtx -q -ugt $curctx` == 1)? 1 : 2; radioButtonGrp -e -sl $useLocalTolerance commonToleranceOptions; floatSliderGrp -e -enable false commonPositionalTolerance; if( $useLocalTolerance == 2 ) { floatSliderGrp -e -enable true commonPositionalTolerance; } // Connect this slider with a command to update the tolerance // when the slider is changed. // floatSliderGrp -e -cc ("roundCRCtx -e -tol #1 " + $curctx + ";") commonPositionalTolerance ; setUITemplate -popTemplate; }