// =========================================================================== // 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: // rebuildCurveAddOptions // // Description: // Part of the option box for rebuild curve. // Construct the option box UI. Involves accessing the standard option // box and customizing the UI accordingly. // // Input Arguments: // None. // // Return Value: // None. // global proc rebuildCurveAddOptions( string $parent, int $needKeepOriginal ) { setUITemplate -pushTemplate DefaultTemplate; setParent $parent; radioButtonGrp -numberOfRadioButtons 3 -label (uiRes("m_rebuildCurveAddOptions.kRebuildType")) -label1 (uiRes("m_rebuildCurveAddOptions.kUniform")) -label2 (uiRes("m_rebuildCurveAddOptions.kReduce")) -label3 (uiRes("m_rebuildCurveAddOptions.kMatchKnots")) rebuildTypeRadioGroup1; radioButtonGrp -shareCollection rebuildTypeRadioGroup1 -numberOfRadioButtons 2 -label "" -label1 (uiRes("m_rebuildCurveAddOptions.kNoMultipleKnots")) -label2 (uiRes("m_rebuildCurveAddOptions.kCurvature")) rebuildTypeRadioGroup2; radioButtonGrp -shareCollection rebuildTypeRadioGroup1 -numberOfRadioButtons 1 -label "" -label1 (uiRes("m_rebuildCurveAddOptions.kEndConditions")) rebuildTypeRadioGroup3; // tab for end conditions tabLayout -tabsVisible false endKnotsTabLayout; columnLayout endKnotsGroups; radioButtonGrp -numberOfRadioButtons 2 -label (uiRes("m_rebuildCurveAddOptions.kEndConditionsKnotsTab")) -label1 (uiRes("m_rebuildCurveAddOptions.kNoMultipleKnotsKnotsTab")) -label2 (uiRes("m_rebuildCurveAddOptions.kMultipleKnots")) endKnotsRadioButtonGrp; setParent ..; setParent ..; radioButtonGrp -nrb 3 -label (uiRes("m_rebuildCurveAddOptions.kParameterRange")) -label1 (uiRes("m_rebuildCurveAddOptions.kZeroToOne")) -label2 (uiRes("m_rebuildCurveAddOptions.kKeep")) -label3 (uiRes("m_rebuildCurveAddOptions.kZeroSpans")) keepRangeRadioButtonGrp; checkBoxGrp -ncb 4 -label (uiRes("m_rebuildCurveAddOptions.kKeepLabel")) -label1 (uiRes("m_rebuildCurveAddOptions.kEnds")) -label2 (uiRes("m_rebuildCurveAddOptions.kTangents")) -label3 (uiRes("m_rebuildCurveAddOptions.kCVs")) -label4 (uiRes("m_rebuildCurveAddOptions.kNumSpans")) -on3 ("rebuildCurveVisibility " + $parent + " -1 -1 1 -1") -of3 ("rebuildCurveVisibility " + $parent + " -1 -1 0 -1") -on4 ("rebuildCurveVisibility " + $parent + " -1 -1 -1 1") -of4 ("rebuildCurveVisibility " + $parent + " -1 -1 -1 0") keepCheckBoxGrp; tabLayout -tabsVisible false uniformTypeTabLayout; columnLayout uniformTypeSliders; intSliderGrp -label (uiRes("m_rebuildCurveAddOptions.kNumberOfSpans")) -min 0 -max 100 -fmx 5000 -field on numSpansIntSliderGrp; radioButtonGrp -label (uiRes("m_rebuildCurveAddOptions.kDegree")) -numberOfRadioButtons 3 -label1 (uiRes("m_rebuildCurveAddOptions.kLinear")) -label2 (uiRes("m_rebuildCurveAddOptions.kTwo")) // Quadratic -label3 (uiRes("m_rebuildCurveAddOptions.kCubic")) -select 3 rebuildCrvDegree123; radioButtonGrp -shareCollection rebuildCrvDegree123 -numberOfRadioButtons 2 -label1 (uiRes("m_rebuildCurveAddOptions.kFive")) // Quintic -label2 (uiRes("m_rebuildCurveAddOptions.kSeven")) rebuildCrvDegree57; setParent ..; setParent ..; // Set the layout that contains the number of spans slider and // the degree slider so that only displays stuff when the type is Uniform. // radioButtonGrp -edit -cc1 ("rebuildCurveVisibility " + $parent + " -1 1 -1 -1") -cc2 ("rebuildCurveVisibility " + $parent + " -1 2 -1 -1") -cc3 ("rebuildCurveVisibility " + $parent + " -1 3 -1 -1") rebuildTypeRadioGroup1; radioButtonGrp -edit -cc1 ("rebuildCurveVisibility " + $parent + " -1 4 -1 -1") -cc2 ("rebuildCurveVisibility " + $parent + " -1 5 -1 -1") rebuildTypeRadioGroup2; radioButtonGrp -e -cc1 ("rebuildCurveVisibility " + $parent + " -1 6 -1 -1") rebuildTypeRadioGroup3; if( $needKeepOriginal ) { separator; checkBoxGrp -ncb 1 -label1 (uiRes("m_rebuildCurveAddOptions.kKeepOriginal")) keepOriginalCheckBox; } tabLayout -tabsVisible false toleranceTabLayout; columnLayout toleranceGroups; radioButtonGrp -numberOfRadioButtons 2 -label (uiRes("m_rebuildCurveAddOptions.kUseTolerance")) -label1 (uiRes("m_rebuildCurveAddOptions.kGlobal")) -label2 (uiRes("m_rebuildCurveAddOptions.kLocal")) toleranceRadioButtonGrp; tabLayout -tabsVisible false localToleranceTabLayout; columnLayout localToleranceSlider; floatSliderGrp -label (uiRes("m_rebuildCurveAddOptions.kPositionalTolerance")) -min 0.001 -max 1.0 -fmn 0.00001 -fmx 1000.0 localTolFloatFieldGrp; setParent ..; setParent ..; setParent ..; setParent ..; // Set the tolerance radio button up so that when "Global" is // selected, then the local tolerance slider is disabled. // When "Local" is selected then the local tolerance slider is enabled. // radioButtonGrp -edit -cc1 ("rebuildCurveVisibility " + $parent + " 1 -1 -1 -1") -cc2 ("rebuildCurveVisibility " + $parent + " 0 -1 -1 -1") toleranceRadioButtonGrp; setUITemplate -popTemplate; }