1/****************************************************************************** 2 NintendoWare for CTR Maya Plugin 3 4 File: NW4C_CreateMenu.mel 5 Description: create menu 6 Date: 2010/04/28 7 Author: Takashi Endo 8 9 Copyright (C)2009-2010 Nintendo Co., Ltd. / HAL Laboratory, Inc. All rights reserved. 10******************************************************************************/ 11 12/****************************************************************************** 13 show plugin version 14******************************************************************************/ 15global proc NW4C_ShowPluginVersion() 16{ 17 string $supportVer = getApplicationVersionAsFloat(); 18 19 string $pluginVer = "?"; 20 if (`pluginInfo -q -l "NW4C_Export.mll"`) 21 { 22 $pluginVer = eval("NW4C_ExportInfoCmd -p"); 23 } 24 25 confirmDialog -t "NW4C Maya Plugin Version" 26 -m ("NintendoWare for CTR\n" 27 + "Maya " + $supportVer + " Plugin " 28 + "Ver " + $pluginVer + "\n\n" 29 + "Copyright (C)2009-2010 Nintendo Co., Ltd. / HAL Laboratory, Inc.\n" 30 + "All rights reserved.") 31 -b "OK" -db "OK" -ma "center"; 32} 33 34/****************************************************************************** 35 main 36******************************************************************************/ 37global proc NW4C_CreateMenu() 38{ 39 global string $gMainWindow; 40 41 //----------------------------------------------------------------------------- 42 // check UI exist 43 if ($gMainWindow == "" || !`window -ex $gMainWindow`) 44 { 45 return; 46 } 47 48 //----------------------------------------------------------------------------- 49 // get version 50 float $mayaVer = getApplicationVersionAsFloat(); 51 52 //----------------------------------------------------------------------------- 53 // set parent 54 setParent $gMainWindow; 55 56 //----------------------------------------------------------------------------- 57 // delete old menu 58 if (`menu -q -ex nw4cMainMenu`) 59 { 60 deleteUI nw4cMainMenu; 61 } 62 63 //----------------------------------------------------------------------------- 64 // create menu 65 menu -p $gMainWindow -l "NW4C" 66 -allowOptionBoxes 0 -tearOff 1 67 nw4cMainMenu; 68 69 //----------------------------------------------------------------------------- 70 // export 71 menuItem -l "NW4C Export" 72 -ann "Export intermediate files & Use CreativeStudio" 73 -c "NW4C_ExpDirect"; 74 75 menuItem -l "NW4C Export with Setting..." 76 -ann "NW4C Export Options" 77 -c "NW4C_ExpDialog"; 78 79 menuItem -d 1; 80 81 //----------------------------------------------------------------------------- 82 // material attr 83 menuItem -l "NW4C Set Material Attribute..." 84 -ann "Set material attributes of selected shadingEngine (material) node" 85 -c "NW4C_SetMaterialAttr"; 86 87 //----------------------------------------------------------------------------- 88 // render priority 89 menuItem -l "NW4C Set Render Priority..." 90 -ann "Set render priority of selected shadingEngine (material) node" 91 -c "NW4C_SetRenderPriority"; 92 93 //----------------------------------------------------------------------------- 94 // normal mapping attr 95// menuItem -l "NW4C Set Normal Mapping Attribute..." 96// -ann "Set normal mapping attributes of selected file node" 97// -c "NW4C_SetNormalMappingAttr"; 98 99 menuItem -d 1; 100 101 //----------------------------------------------------------------------------- 102 // no compress node 103 menuItem -l "NW4C Set No Compress Node..." 104 -ann "Set no compress flag of selected transform node" 105 -c "NW4C_SetNoCompressNode"; 106 107 //----------------------------------------------------------------------------- 108 // billboard 109 menuItem -l "NW4C Set Billboard..." 110 -ann "Set billboard mode of selected transform node" 111 -c "NW4C_SetBillboard"; 112 113 //----------------------------------------------------------------------------- 114 // combine group 115 menuItem -l "NW4C Set Combine Group..." 116 -ann "Set combine group of selected transform node" 117 -c "NW4C_SetCombineGroup"; 118 119 //----------------------------------------------------------------------------- 120 // primitive type 121// menuItem -l "NW4C Set Primitive Type..." 122// -ann "Set primitive type of selected mesh object" 123// -c "NW4C_SetPrimitiveType"; 124 125 menuItem -d 1; 126 127 //----------------------------------------------------------------------------- 128 // animation 129 menuItem -l "NW4C Set Animation Range..." 130 -ann "Set animation range attributes" 131 -c "NW4C_SetAnimRange"; 132 menuItem -l "NW4C Set Frame Extension List..." 133 -ann "Set output frame extension list for texture pattern animation" 134 -c "NW4C_SetFrameExtensionList"; 135// menuItem -l "NW4C Set Shape Anim Attribute..." 136// -ann "Set shape anim attributes of selected blendShape (transform) node" 137// -c "NW4C_SetShapeAnimAttr"; 138 139 menuItem -d 1; 140 141 //----------------------------------------------------------------------------- 142 // scene 143 menuItem -l "NW4C Set Camera Fovy..." 144 -ann "Set camera fovy of selected camera (transform) node" 145 -c "NW4C_SetCameraFovy"; 146 147 menuItem -d 1; 148 149 //----------------------------------------------------------------------------- 150 // other 151 menuItem -l "NW4C Set User Data..." 152 -ann "Set user data of selected transform node & shadingEngine (material) node" 153 -c "NW4C_SetUserData"; 154 155 menuItem -d 1; 156 157 //----------------------------------------------------------------------------- 158 // help 159 menuItem -l "Help Index..." 160 -ann "Show help index" 161 -c "NW4C_ShowHelp \"MayaPlugin.html\" \"\""; 162 163 menuItem -l "Plugin Version..." 164 -ann "Show plugin version" 165 -c "NW4C_ShowPluginVersion"; 166 167 setParent -m ..; 168} 169