/****************************************************************************** NintendoWare for CTR Maya Plugin File: NW4C_CreateMenu.mel Description: create menu Date: 2010/04/28 Author: Takashi Endo Copyright (C)2009-2010 Nintendo Co., Ltd. / HAL Laboratory, Inc. All rights reserved. ******************************************************************************/ /****************************************************************************** show plugin version ******************************************************************************/ global proc NW4C_ShowPluginVersion() { string $supportVer = getApplicationVersionAsFloat(); string $pluginVer = "?"; if (`pluginInfo -q -l "NW4C_Export.mll"`) { $pluginVer = eval("NW4C_ExportInfoCmd -p"); } confirmDialog -t "NW4C Maya Plugin Version" -m ("NintendoWare for CTR\n" + "Maya " + $supportVer + " Plugin " + "Ver " + $pluginVer + "\n\n" + "Copyright (C)2009-2010 Nintendo Co., Ltd. / HAL Laboratory, Inc.\n" + "All rights reserved.") -b "OK" -db "OK" -ma "center"; } /****************************************************************************** main ******************************************************************************/ global proc NW4C_CreateMenu() { global string $gMainWindow; //----------------------------------------------------------------------------- // check UI exist if ($gMainWindow == "" || !`window -ex $gMainWindow`) { return; } //----------------------------------------------------------------------------- // get version float $mayaVer = getApplicationVersionAsFloat(); //----------------------------------------------------------------------------- // set parent setParent $gMainWindow; //----------------------------------------------------------------------------- // delete old menu if (`menu -q -ex nw4cMainMenu`) { deleteUI nw4cMainMenu; } //----------------------------------------------------------------------------- // create menu menu -p $gMainWindow -l "NW4C" -allowOptionBoxes 0 -tearOff 1 nw4cMainMenu; //----------------------------------------------------------------------------- // export menuItem -l "NW4C Export" -ann "Export intermediate files & Use CreativeStudio" -c "NW4C_ExpDirect"; menuItem -l "NW4C Export with Setting..." -ann "NW4C Export Options" -c "NW4C_ExpDialog"; menuItem -d 1; //----------------------------------------------------------------------------- // material attr menuItem -l "NW4C Set Material Attribute..." -ann "Set material attributes of selected shadingEngine (material) node" -c "NW4C_SetMaterialAttr"; //----------------------------------------------------------------------------- // render priority menuItem -l "NW4C Set Render Priority..." -ann "Set render priority of selected shadingEngine (material) node" -c "NW4C_SetRenderPriority"; //----------------------------------------------------------------------------- // normal mapping attr // menuItem -l "NW4C Set Normal Mapping Attribute..." // -ann "Set normal mapping attributes of selected file node" // -c "NW4C_SetNormalMappingAttr"; menuItem -d 1; //----------------------------------------------------------------------------- // no compress node menuItem -l "NW4C Set No Compress Node..." -ann "Set no compress flag of selected transform node" -c "NW4C_SetNoCompressNode"; //----------------------------------------------------------------------------- // billboard menuItem -l "NW4C Set Billboard..." -ann "Set billboard mode of selected transform node" -c "NW4C_SetBillboard"; //----------------------------------------------------------------------------- // combine group menuItem -l "NW4C Set Combine Group..." -ann "Set combine group of selected transform node" -c "NW4C_SetCombineGroup"; //----------------------------------------------------------------------------- // force export key menuItem -l "NW4C Set Force Export Key..." -ann "Set force export key of selected transform node" -c "NW4C_SetForceExportKey"; //----------------------------------------------------------------------------- // primitive type // menuItem -l "NW4C Set Primitive Type..." // -ann "Set primitive type of selected mesh object" // -c "NW4C_SetPrimitiveType"; menuItem -d 1; //----------------------------------------------------------------------------- // animation menuItem -l "NW4C Set Animation Range..." -ann "Set animation range attributes" -c "NW4C_SetAnimRange"; menuItem -l "NW4C Set Frame Extension List..." -ann "Set output frame extension list for texture pattern animation" -c "NW4C_SetFrameExtensionList"; // menuItem -l "NW4C Set Shape Anim Attribute..." // -ann "Set shape anim attributes of selected blendShape (transform) node" // -c "NW4C_SetShapeAnimAttr"; menuItem -d 1; //----------------------------------------------------------------------------- // scene menuItem -l "NW4C Set Camera Fovy..." -ann "Set camera fovy of selected camera (transform) node" -c "NW4C_SetCameraFovy"; menuItem -d 1; //----------------------------------------------------------------------------- // other menuItem -l "NW4C Set User Data..." -ann "Set user data of selected transform node & shadingEngine (material) node" -c "NW4C_SetUserData"; menuItem -d 1; //----------------------------------------------------------------------------- // help menuItem -l "Help Index..." -ann "Show help index" -c "NW4C_ShowHelp \"MayaPlugin.html\" \"\""; menuItem -l "Plugin Version..." -ann "Show plugin version" -c "NW4C_ShowPluginVersion"; setParent -m ..; }