// =========================================================================== // 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 createOpenFlightMenu() { global string $gMainWindow; // Set the name of the OpenFlight menu global string $gMainOpenFlightMenu = "OpenFlightMenu"; // If the OpenFlight menu already exists, do nothing if ( `menu -exists $gMainOpenFlightMenu` ) { return; } // Create the menu // menu -label (uiRes("m_openFlightCreateUI.kOpenFlight")) -parent $gMainWindow -tearOff true -allowOptionBoxes true $gMainOpenFlightMenu; // Add the creation menu items to the OpenFlight menu // menuItem -label (uiRes("m_openFlightCreateUI.kCreateLightPoints")) -annotation (uiRes("m_openFlightCreateUI.kCreateLightPointsAnnot")) -command "performLightPoints 0" createLightPoints; menuItem -optionBox true -annotation (uiRes("m_openFlightCreateUI.kLightPointsOptionsAnnot")) -command "performLightPoints 1" lightPointsOptions; menuItem -label (uiRes("m_openFlightCreateUI.kCreateLightsOnCurve")) -annotation (uiRes("m_openFlightCreateUI.kCreateLightsOnCurveAnnot")) -command "performLightsOnCurve 0" createLightsOnCurve; menuItem -optionBox true -annotation (uiRes("m_openFlightCreateUI.kLightsOnCurveOptionsAnnot")) -command "performLightsOnCurve 1" lightsOnCurveOptions; menuItem -divider true; // Add the edit menu items to the OpenFlight menu // menuItem -label (uiRes("m_openFlightCreateUI.kEditLightPointColors")) -command "fltLightPointColorEditor" editLightPointColors; menuItem -label (uiRes("m_openFlightCreateUI.kEditLightPointNormals")) -command "fltLightPointNormalEditor" editLightPointNormals; } global proc openFlightCreateUI() { // Create the main OpenFlight menu createOpenFlightMenu; }