// =========================================================================== // 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: November 20, 1996 // // Description: // This script contains common menu definition routines shared // between the graph editor and the dope sheet. // // A call to the proc 'loadAnimPanelLibrary' will make sure that // all the other helper procs defined in here are loaded and available // // Procs defined within this script: // // Input Arguments: // None. // // Return Value: // None. // global proc string[] definePanelElements (string $panel) // // Procedure Name: // definePanelElements // // Description: // This creates the common widgets for animation panels // // Example: // Create a menu that this submenu is to be attached to // (make sure that the menu is defined to allow option boxes) // // menuItem -label "Edit" // -allowOptionBoxes true // -subMenu true // editHierItem; // defineEditMenu $editor "editHierItem"; // setParent -m ..; // // Input Arguments: // string $panel The name of the panel being created // string $parentMenu The name of the parent menu that this // submenu is being attached to // // Return Value: // string[] where: // [0] Name of the container layout // [1] Name of the menu frame // [2] Name of the menu form // [3] Name of the toolbar frame // [4] Name of the toolbar form // [5] Name of the toolbar flow layout // [6] Name of the editor layout // Note: add new return names below here // { string $widgetList[]; $widgetList[2] = `scriptedPanel -query -control $panel`; $widgetList[0] = `formLayout`; $widgetList[3] = `frameLayout -visible true -borderVisible false -labelVisible false -collapsable false -collapse true`; $widgetList[4] = `formLayout -visible true`; $widgetList[5] = `flowLayout -visible true`; setParent $widgetList[0]; $widgetList[6] = `paneLayout -configuration "vertical2" -staticWidthPane 1`; formLayout -edit -attachForm $widgetList[3] top 0 -attachForm $widgetList[3] right 0 -attachForm $widgetList[3] left 0 -attachControl $widgetList[6] top 0 $widgetList[3] -attachForm $widgetList[6] bottom 0 -attachForm $widgetList[6] right 0 -attachForm $widgetList[6] left 0 $widgetList[0]; setParent $widgetList[0]; return ($widgetList); } global proc loadAnimPanelLibrary () { // Load in the common menu elements library // loadAnimMenuLibrary; }