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 // force export key 121 menuItem -l "NW4C Set Force Export Key..." 122 -ann "Set force export key of selected transform node" 123 -c "NW4C_SetForceExportKey"; 124 125 //----------------------------------------------------------------------------- 126 // primitive type 127// menuItem -l "NW4C Set Primitive Type..." 128// -ann "Set primitive type of selected mesh object" 129// -c "NW4C_SetPrimitiveType"; 130 131 menuItem -d 1; 132 133 //----------------------------------------------------------------------------- 134 // animation 135 menuItem -l "NW4C Set Animation Range..." 136 -ann "Set animation range attributes" 137 -c "NW4C_SetAnimRange"; 138 menuItem -l "NW4C Set Frame Extension List..." 139 -ann "Set output frame extension list for texture pattern animation" 140 -c "NW4C_SetFrameExtensionList"; 141// menuItem -l "NW4C Set Shape Anim Attribute..." 142// -ann "Set shape anim attributes of selected blendShape (transform) node" 143// -c "NW4C_SetShapeAnimAttr"; 144 145 menuItem -d 1; 146 147 //----------------------------------------------------------------------------- 148 // scene 149 menuItem -l "NW4C Set Camera Fovy..." 150 -ann "Set camera fovy of selected camera (transform) node" 151 -c "NW4C_SetCameraFovy"; 152 153 menuItem -d 1; 154 155 //----------------------------------------------------------------------------- 156 // other 157 menuItem -l "NW4C Set User Data..." 158 -ann "Set user data of selected transform node & shadingEngine (material) node" 159 -c "NW4C_SetUserData"; 160 161 menuItem -d 1; 162 163 //----------------------------------------------------------------------------- 164 // help 165 menuItem -l "Help Index..." 166 -ann "Show help index" 167 -c "NW4C_ShowHelp \"MayaPlugin.html\" \"\""; 168 169 menuItem -l "Plugin Version..." 170 -ann "Show plugin version" 171 -c "NW4C_ShowPluginVersion"; 172 173 setParent -m ..; 174} 175