// =========================================================================== // 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: 7 Oct 1998 // // Procedure Name: // rebuildCurveVisibility // // Description: // Depending on the options, some other options do or do not show. // // Input Arguments: // parent - Top level parent layout of the option box UI. // Required so that UI object names can be // successfully resolved. // Return Value: // None. // global proc rebuildCurveVisibility( string $parent, int $useGlobalTol, int $rebuildType, int $keepCVs, int $keepNumSpans ) { if( $useGlobalTol < 0 ) { $useGlobalTol = `radioButtonGrp -q -select toleranceRadioButtonGrp`; } if( $rebuildType < 0 ) { $rebuildType = `radioButtonGrp -q -select rebuildTypeRadioGroup1`; if( $rebuildType == 0 ) { $rebuildType = `radioButtonGrp -q -sl rebuildTypeRadioGroup2` + 3; } } if( $keepCVs < 0 ) { $keepCVs = `checkBoxGrp -query -v3 keepCheckBoxGrp`; } if( $keepNumSpans < 0 ) { $keepNumSpans = `checkBoxGrp -q -v4 keepCheckBoxGrp`; } // can only show slider if not keeping CVs or numSpans int $showCVslider = ((!$keepCVs) && (!$keepNumSpans)); switch( $rebuildType ) { case 1: default: intSliderGrp -e -en ($showCVslider) numSpansIntSliderGrp; checkBoxGrp -e -en true keepCheckBoxGrp; checkBoxGrp -e -en1 (!$keepCVs) -en2 (!$keepCVs) -en3 true -en4 (!$keepCVs) keepCheckBoxGrp; tabLayout -e -vis true uniformTypeTabLayout; tabLayout -e -vis false toleranceTabLayout; tabLayout -e -vis false endKnotsTabLayout; break; case 2: checkBoxGrp -e -en false keepCheckBoxGrp; tabLayout -e -vis false uniformTypeTabLayout; tabLayout -e -vis true toleranceTabLayout; if( $useGlobalTol == 1 ) { tabLayout -e -vis false localToleranceTabLayout; } else { tabLayout -e -vis true localToleranceTabLayout; } tabLayout -e -vis false endKnotsTabLayout; break; case 3: checkBoxGrp -e -en true keepCheckBoxGrp; // for match knots, enable keepCVs option, disable keepNumSpans checkBoxGrp -e -en1 true -en2 true -en3 true -en4 false keepCheckBoxGrp; tabLayout -e -vis false uniformTypeTabLayout; tabLayout -e -vis false toleranceTabLayout; tabLayout -e -vis false endKnotsTabLayout; break; case 4: checkBoxGrp -e -en false keepCheckBoxGrp; tabLayout -e -vis false uniformTypeTabLayout; tabLayout -e -vis false toleranceTabLayout; tabLayout -e -vis false endKnotsTabLayout; break; case 5: checkBoxGrp -e -en false keepCheckBoxGrp; tabLayout -e -vis false uniformTypeTabLayout; tabLayout -e -vis true toleranceTabLayout; if( $useGlobalTol == 1 ) { tabLayout -e -vis false localToleranceTabLayout; } else { tabLayout -e -vis true localToleranceTabLayout; } tabLayout -e -vis false endKnotsTabLayout; break; case 6: checkBoxGrp -e -en false keepCheckBoxGrp; tabLayout -e -vis false uniformTypeTabLayout; tabLayout -e -vis false toleranceTabLayout; // enable end knots option tabLayout -e -vis true endKnotsTabLayout; break; } }