// =========================================================================== // 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. // =========================================================================== global proc illegalNameDialogDismiss(int $noMore) { if ($noMore!=0){ disableIncorrectNameWarning; } layoutDialog -dismiss "OK"; } global proc createIllegalNameDialog() { string $form = `setParent -q`; formLayout -e $form; string $text = (uiRes("m_illegalNameDialog.kIllegalNameWarning")); string $okText = (uiRes("m_illegalNameDialog.kOK")); string $listNodesText = (uiRes("m_illegalNameDialog.kListNodes")); string $moreInfoText = (uiRes("m_illegalNameDialog.kMoreInfo")); string $dontShowAgainText = (uiRes("m_illegalNameDialog.kNoMoreWarning")); string $dontShowAgainCheckBox = `checkBox -l $dontShowAgainText -v 0`; string $textCtrl = `text -l $text`; string $callbackCmd = "illegalNameDialogDismiss(eval(\"checkBox -q -value "+$dontShowAgainCheckBox+"\"))"; string $okButton = `button -l $okText -c $callbackCmd`; string $listNodesButton = `button -l $listNodesText -c "listNodesWithIncorrectNames"`; string $moreInfoButton = `button -l $moreInfoText-command ( "showHelp incorrectNames" )`; checkBox -e $dontShowAgainCheckBox; int $spacer = 5; int $top = 10; int $edge = 10; int $bottom = 10; formLayout -edit -attachForm $textCtrl "top" $top -attachForm $textCtrl "left" $edge -attachNone $textCtrl "bottom" -attachForm $textCtrl "right" $edge -attachNone $okButton "top" -attachForm $okButton "left" $edge -attachForm $okButton "bottom" $bottom -attachPosition $okButton "right" $spacer 20 -attachNone $listNodesButton "top" -attachPosition $listNodesButton "left" $spacer 20 -attachForm $listNodesButton "bottom" $bottom -attachPosition $listNodesButton "right" $spacer 40 -attachNone $moreInfoButton "top" -attachPosition $moreInfoButton "left" $spacer 40 -attachForm $moreInfoButton "bottom" $bottom -attachPosition $moreInfoButton "right" $spacer 60 -attachNone $dontShowAgainCheckBox "top" -attachPosition $dontShowAgainCheckBox "left" $spacer 60 -attachForm $dontShowAgainCheckBox "bottom" $bottom -attachPosition $dontShowAgainCheckBox "right" $spacer 80 $form; } global proc illegalNameDialog() { layoutDialog -title (uiRes("m_illegalNameDialog.kIllegalNodeName")) -ui ("createIllegalNameDialog"); }