// =========================================================================== // 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: May 14 1996 // // Description: // These procs create the controls for a common modelling property sheet. // See also commonModellingValues.mel for procs that set the state of the // property sheet. // // Input Arguments: // None. // // Return Value: // None. // proc commonModellingSetCallbacks( string $parent, string $ctxCmdName ) { // // Description: // Set the callbacks for all of the controls in the dialog. // Modifying the context will force commonModellingValues() to // be called to update the state of the property sheet. // // setParent $parent; } global proc optionalCommonModellingSetCallbacks(string $parent, string $ctxCmdName, string $showOutputStyle, string $showKeepOriginals, string $showCurveRange, string $showRebuild) { // // Description: // Set the callbacks for all of the controls in the dialog. // Modifying the context will force commonModellingValues() to // be called to update the state of the property sheet. // // setParent $parent; if ($showOutputStyle == "showOutputStyle") { frameLayout -edit -collapse false showOutputFrameLayout; radioButtonGrp -e -cc1 ($ctxCmdName + " -e -po false `currentCtx`") -cc2 ($ctxCmdName + " -e -po true `currentCtx`") commonModellingOutputOptions; } else { frameLayout -edit -collapse true showOutputFrameLayout; } if ($showKeepOriginals == "showKeepOriginals") { frameLayout -edit -collapse false keepOriginalFrameLayout; checkBoxGrp -e -cc1 ($ctxCmdName + " -e -rpo (! #1) `currentCtx`") commonModellingReplaceOptions; } else { frameLayout -edit -collapse true keepOriginalFrameLayout; } if ($showCurveRange == "showCurveRange") { frameLayout -edit -collapse false curveRangeFrameLayout; // Needs editing to match curve range attribute name radioButtonGrp -e -cc1 ($ctxCmdName + " -e -rn false `currentCtx`") -cc2 ($ctxCmdName + " -e -rn true `currentCtx`") commonModellingCurveRangeOptions; } else { frameLayout -edit -collapse true curveRangeFrameLayout; } if ($showRebuild == "showRebuild") { frameLayout -edit -collapse false rebuildStyleFrameLayout; // Needs editing to match rebuild attribute name checkBoxGrp -e -cc ($ctxCmdName + " -e -rb #1 `currentCtx`") commonModellingRebuildOption; } else { frameLayout -edit -collapse true rebuildStyleFrameLayout; } } global proc commonModellingProperties( string $parent, string $ctxCmdName ) // // Description: // This procedure builds the property sheet and assigns callbacks to its // controls. The state of the controls are set in commonModellingValues(). // // Description: // The common controls will look like: // // [] History // [] Auto Create // { setUITemplate -pushTemplate OptionsTemplate; setParent $parent; // // Common modelling options // frameLayout -collapsable true -collapse false -label (uiRes("m_commonModellingProperties.kStandardOptions")) commonModellingFrame; columnLayout commonModellingLayout; frameLayout -labelVisible false -borderVisible false -collapsable true -collapse true keepOriginalFrameLayout; columnLayout; checkBoxGrp -numberOfCheckBoxes 1 -label "" -label1 (uiRes("m_commonModellingProperties.kKeepOriginal")) -value1 false commonModellingReplaceOptions; setParent ..; setParent ..; frameLayout -labelVisible false -borderVisible false -collapsable true -collapse true curveRangeFrameLayout; columnLayout; radioButtonGrp -numberOfRadioButtons 2 -label (uiRes("m_commonModellingProperties.kCurveRange")) -label1 (uiRes("m_commonModellingProperties.kComplete")) -label2 (uiRes("m_commonModellingProperties.kPartial")) -select 1 commonModellingCurveRangeOptions; setParent ..; setParent ..; frameLayout -labelVisible false -borderVisible false -collapsable true -collapse true rebuildStyleFrameLayout; columnLayout; checkBoxGrp -numberOfCheckBoxes 1 -label "" -label1 (uiRes("m_commonModellingProperties.kRebuild")) -value1 false commonModellingRebuildOption; setParent ..; setParent ..; frameLayout -labelVisible false -borderVisible false -collapsable true -collapse true showOutputFrameLayout; columnLayout; radioButtonGrp -numberOfRadioButtons 2 -label (uiRes("m_commonModellingProperties.kOutputGeometry")) -label1 (uiRes("m_commonModellingProperties.kNURBS")) -label2 (uiRes("m_commonModellingProperties.kPolygons")) -select 1 commonModellingOutputOptions; setParent ..; setParent ..; setParent ..; setParent ..; commonModellingSetCallbacks( $parent, $ctxCmdName ); setUITemplate -popTemplate; }