// =========================================================================== // 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: March, 2005 // // Description: // This is the script used to implement menus and option boxes for // the makeCollideNCloth menu. // // Arguments: // $flag 0 = execute the command // 1 = bring up the option box // 2 = dragging to shelf; just return the command string // // Return Value: // String corresponding to the command (to be) executed. // // // Procedure Name: // makeCollideNClothOptions // // Description: // Construct the option box UI. Involves accessing the standard option // box and customizing the UI accordingly. // // Input Arguments: // None. // // Return Value: // None. // proc makeCollideNClothOptions() { // Name of the command for this option box. // string $commandName = "performMakeCollideNCloth"; // Build the option box actions. // string $layout = getOptionBox(); setParent $layout; setUITemplate -pushTemplate DefaultTemplate; tabLayout -tv false -scr true; string $parent = `columnLayout -adjustableColumn 1`; string $nucleusButton = nucleusSolverButton(""); optionMenuGrp -e -cw 1 50 $nucleusButton; // 'Apply' button. // string $applyBtn = getOptionBoxApplyBtn(); button -edit -label (uiRes("m_performMakeCollideNCloth.kMakeCollideCloth")) -command ("performMakeCollideNCloth 0" ) $applyBtn; // Set the option box title. // setOptionBoxTitle((uiRes("m_performMakeCollideNCloth.kMakeCollideOptions"))); setOptionBoxCommandName($commandName); setOptionBoxHelpTag( "MakeCollideNCloth" ); // Pop the UI template // setUITemplate -popTemplate; // Set the current values of the option box. // // Show the option box. // showOptionBox(); } global proc string performMakeCollideNCloth( int $flag) { string $cmd = "makeCollideNCloth"; switch ($flag) { // Execute the command from option settings. // case 0: evalEcho($cmd); break; // Show the option box. // case 1: makeCollideNClothOptions(); break; // Return the command string. // case 2: break; } return $cmd; }