-- NW4C Menu Script(2010/10/20) -- Version 0.4.7 -- (c)2010 Nintendo fileIn "NW4C_utils.ms.inc" rollout nw4cExportRollout "NW4C Export Setting" width:480 height:696 ( local utils = nw4c_utils() groupBox grpOutputOptions "Output Options" pos:[7,8] width:464 height:104 --group "Output Options" --( label lbl4 "Export Target" pos:[16,24] width:96 height:20 radioButtons rdoSelection "" pos:[120,24] width:80 height:16 labels:#("All", "Selection") columns:2 checkbox chkUseCS "Use Creative Studio" pos:[310,24] width:160 height:16 label lbl2 "File name:" pos:[16,44] width:72 height:20 editText editFilename "" pos:[96,44] width:264 button btnNameNode "Node" pos:[362,44] width:48 height:16 button btnNameScene "Scene" pos:[416,44] width:48 height:16 label lbl1 "File path:" pos:[16,66] width:72 height:20 editText editFilepath "" pos:[96,66] width:341 button btnSelectPath "+" pos:[440,66] width:20 height:16 toolTip:"Select folder" checkbox chkMergeCmdl "Merge cmdl" pos:[16,88] width:80 height:16 editText editMergeFile "" pos:[96,88] width:341 button btnSelectMerge "+" pos:[440,88] width:20 height:16 toolTip:"Select Merge File" --) groupBox grpGeneralOptions "General Options" pos:[8,120] width:464 height:64 --group "General Options" --( spinner spnMagnify "Magnify: " pos:[40,136] width:120 height:16 range:[0.0001,10000,1] type:#float scale:0.1 label lbl8 "Start/End Frame:" pos:[16,160] width:112 height:20 radioButtons rdoTimeRange "" pos:[128,160] width:104 height:16 labels:#("All", "Range") columns:2 spinner spnTimeStart "" pos:[248,160] width:64 height:16 range:[0,100000,0] type:#integer scale:1 spinner spnTimeEnd "" pos:[320,160] width:64 height:16 range:[0,100000,100] type:#integer scale:1 checkbox chkUseFigureMode "Use FigureMode and SkinPose" pos:[216,136] width:240 height:16 checked:false --) groupBox grpOutputFileSelection "Output File Selection" pos:[8,192] width:464 height:88 --group "Output File Selection" --( checkbox chkExportModel "Model Data (.cmdl)" pos:[24,208] width:208 height:16 checked:true checkbox chkExportTex "Texture Data (.ctex)" pos:[24,224] width:208 height:16 checked:true checkbox chkExportSkelAnim "Skeletal Animation Data (.cskla)" pos:[24,240] width:208 height:16 checked:true checkbox chkExportCamera "Camera Data (.ccam)" pos:[260,208] width:208 height:16 checked:true checkbox chkExportLight "Light Data (.clgt)" pos:[260,224] width:208 height:16 checked:true checkbox chkExportMtlAnim "Material Animation Data(.cmata)" pos:[260,240] width:208 height:16 checked:false checkbox chkExportMdlAnim "Model Animation Data(.cmdla)" pos:[24,256] width:208 height:16 checked:false--enabled:false checkbox chkExportEnv "Environment Data(.env)" pos:[260,256] width:208 height:16 checked:false--enabled:false --) groupBox grpOptimizationOptions "Optimization Options" pos:[8,288] width:464 height:60 --group "Optimization Options" --( dropDownList ddlCompressNode "Compress Node" pos:[12,304] width:140 height:41 \ items:#("None", "Cull Useless Node", "Cull Uninfluential Node", "Unite Compressible Node", "Unite All Node") --, "Unite Below Node") dropDownList ddlOptimizeMtl "Compress Material" pos:[158,304] width:140 height:41 items:#("None", "Compress Same Material") checkbox chkOptimizePrim "Optimize Primitive" pos:[304,298] width:166 height:16 --checkbox chkOptimizeMtl "Compress Material" pos:[320,304] width:120 height:16 checkbox chkDisableSimplification "Disable SkeletalModel- Simplification" pos:[304,316] width:166 height:28 --) groupBox grpQuantizationOptions "Quantization Options" pos:[8,352] width:464 height:58 --group "Quantization Options" --( dropDownList ddlQuantPosition "Position" pos:[24,368] width:64 height:41 items:#("Float", "Short", "Byte") dropDownList ddlQuantNormal "Normal" pos:[96,368] width:64 height:41 items:#("Float", "Short", "Byte") dropDownList ddlQuantTex "Tex Coord" pos:[168,368] width:64 height:41 items:#("Float", "Short", "Byte") --spinner spnPrecisionTrans "Translate Precision:" pos:[340,368] width:80 height:16 range:[0.0001,100,0.01] type:#float scale:0.01 --spinner spnPrecisionRotate "Rotate Precision:" pos:[342,392] width:78 height:16 range:[0.0001,100,0.01] type:#float scale:0.01 --spinner spnPrecisionScale "Scale Precision:" pos:[344,416] width:76 height:16 range:[0.0001,100,0.01] type:#float scale:0.01 --checkbox chkFrameFormat "Frame Format" pos:[24,416] width:208 height:16 checked:false --) groupBox grpModelOptions "Model Options" pos:[8,412] width:464 height:64 --group "Model Options" --( checkbox chkNonUniformScale "Non-Uniform Scale" pos:[16,426] width:140 height:16 checked:true spinner spnReserveUniform "Max Reserved Uniform Registers:" pos:[160,450] width:80 height:16 range:[0,60,0] type:#integer scale:1 dropDownList ddlModelBindBy "Mesh Visibility Mode" pos:[260,426] width:120 height:41 items:#("Bind By Index", "Bind By Name") --) groupBox grpAnimationOptions "Animation Options" pos:[8,482] width:464 height:78 --group "Animation Options" --( dropDownList ddlAnimationPrecision "Frame Precision" pos:[24,496] width:104 height:41 items:#("1.0", "0.5", "0.2", "0.1") --enabled:false checkbox chkAnimationLoop "Loop" pos:[144,496] width:80 height:16 label lbl9 "Frame Format:" pos:[24,540] width:80 height:16 radioButtons rdoFrameFormat "" pos:[104,540] width:164 height:16 labels:#("Key Frame", "Full Frame") columns:2 spinner spnScaleQuality " Scale Quantize Quality:" pos:[400,498] width:60 height:16 range:[0,9,9] type:#integer spinner spnRotateQuality " Rotate Quantize Quality:" pos:[400,518] width:60 height:16 range:[0,9,9] type:#integer spinner spnTransQuality "Translate Quantize Quality:" pos:[400,538] width:60 height:16 range:[0,9,9] type:#integer --) groupBox grpToleranceOptions "Tolerance Options" pos:[8,568] width:464 height:88 --group "Tolerance Options" --( spinner spnToleranceNodeT "Node Translate:" pos:[80,584] width:80 height:16 range:[0.0001,100,0.01] type:#float scale:0.01 spinner spnToleranceNodeR "Node Rotate:" pos:[82,608] width:78 height:16 range:[0.0001,100,0.1] type:#float scale:0.01 spinner spnToleranceNodeS "Node Scale:" pos:[84,632] width:76 height:16 range:[0.0001,100,0.1] type:#float scale:0.01 spinner spnToleranceTexT "Tex Translate:" pos:[244,584] width:80 height:16 range:[0.0001,100,0.01] type:#float scale:0.01 spinner spnToleranceTexR "Tex Rotate:" pos:[246,608] width:78 height:16 range:[0.0001,100,0.1] type:#float scale:0.01 spinner spnToleranceTexS "Tex Scale:" pos:[248,632] width:76 height:16 range:[0.0001,100,0.1] type:#float scale:0.01 spinner spnToleranceColor "Color:" pos:[360,584] width:80 height:16 range:[0.0001,100,0.001] type:#float scale:0.01 --) button btnExport "Export" pos:[16,664] width:144 height:24 button btnApply "Apply" pos:[168,664] width:144 height:24 button btnClose "Close" pos:[320,664] width:144 height:24 fn redrawItems = ( spnTimeStart.enabled = spnTimeEnd.enabled = (rdoTimeRange.state == 2) editMergeFile.visible = btnSelectMerge.visible = chkMergeCmdl.state editFilepath.enabled = btnSelectPath.enabled = not chkUseCS.state ) fn loadConfig loadFromScene:true = ( --print "load config" local nw4c = nw4cmax if loadFromScene do nw4c.LoadSetting() editFilepath.text = nw4c.outFolder editFilename.text = nw4c.filename chkUseCS.state = nw4c.UseCreativeStudio chkExportModel.state = nw4c.doesExportModel chkExportTex.state = nw4c.doesExportTexture chkExportSkelAnim.state = nw4c.doesExportAnimation chkExportCamera.state = nw4c.doesExportCamera chkExportLight.state = nw4c.doesExportLight chkExportMtlAnim.state = nw4c.doesExportMtlAnim chkExportMdlAnim.state = nw4c.doesExportModelAnim chkExportEnv.state = nw4c.doesExportEnv -- rdoSelection.state = (if nw4c.doesExportSelected then 2 else 1) -- spnMagnify.value = nw4c.Magnify -- rdoTimeRange.state = (if nw4c.doesExportAllFrames then 1 else 2) spnTimeStart.value = nw4c.StartFrame spnTimeEnd.value = nw4c.EndFrame chkAnimationLoop.state = nw4c.IsLoop ddlAnimationPrecision.selection = case of ( (1 >= nw4c.AnimPrecision) : 1 (2 >= nw4c.AnimPrecision) : 2 (5 >= nw4c.AnimPrecision) : 3 (10 >= nw4c.AnimPrecision) : 4 default: 1 ) -- ddlCompressNode.selection = if nw4c.CompressNode == 6 then 1 else nw4c.CompressNode -- Unite Bleow Nodeを廃止 chkOptimizePrim.state = nw4c.OptimizePrimitive --chkOptimizeMtl.state = nw4c.OptimizeMaterial ddlOptimizeMtl.selection = if nw4c.OptimizeMaterial then 2 else 1 chkDisableSimplification.state = nw4c.DisableModelSimplification chkNonUniformScale.state = nw4c.NonUniformScale spnReserveUniform.value = nw4c.ReservedUniformRegister ddlModelBindBy.selection = (if nw4c.VisibilityBindByName then 2 else 1) -- spnToleranceNodeT.value = nw4c.ToleranceTrans spnToleranceNodeR.value = nw4c.ToleranceRotate spnToleranceNodeS.value = nw4c.ToleranceScale -- spnToleranceTexT.value = nw4c.ToleranceUVTrans spnToleranceTexR.value = nw4c.ToleranceUVRotate spnToleranceTexS.value = nw4c.ToleranceUVScale spnToleranceColor.value = nw4c.ToleranceColor -- --spnPrecisionTrans.value = nw4c.PrecisionTrans --spnPrecisionRotate.value = nw4c.PrecisionRotate --spnPrecisionScale.value = nw4c.PrecisionScale -- spnScaleQuality.value = nw4c.ScaleQuality spnRotateQuality.value = nw4c.RotateQuality spnTransQuality.value = nw4c.TransQuality -- ddlQuantPosition.selection = nw4c.QuantPos ddlQuantNormal.selection = nw4c.QuantNormal ddlQuantTex.selection = nw4c.QuantTex -- chkUseFigureMode.state = nw4c.UseFiguremode rdoFrameFormat.state = (if nw4c.IsFrameFormat then 2 else 1) -- chkMergeCmdl.state = nw4c.UseMerge editMergeFile.text = nw4c.MergeFilename -- ファイル名、パスが空白の場合に適当な値を入れる if(editFilepath.text == "") do ( -- maxファイルが読み込み・保存されていない場合 if(maxFilePath == "") then editFilepath.text = (pathConfig.getDir #export) else editFilepath.text = maxFilePath ) if(editFilename.text == "") do ( -- maxファイルが読み込み・保存されていない場合 if(maxFilePath == "") then editFilename.text = "nw4c" else editFilename.text = (getFilenameFile maxFileName) ) redrawItems() ) fn saveConfig saveToScene:true = ( --print "save config" local nw4c = nw4cmax nw4c.doesExportSelected = (rdoSelection.state == 2) nw4c.outFolder = editFilepath.text nw4c.filename = editFilename.text nw4c.UseCreativeStudio = chkUseCS.state nw4c.doesExportModel = chkExportModel.state nw4c.doesExportTexture = chkExportTex.state nw4c.doesExportAnimation = chkExportSkelAnim.state nw4c.doesExportCamera = chkExportCamera.state nw4c.doesExportLight = chkExportLight.state nw4c.doesExportMtlAnim = chkExportMtlAnim.state nw4c.doesExportModelAnim = chkExportMdlAnim.state nw4c.doesExportEnv = chkExportEnv.state -- nw4c.Magnify = spnMagnify.value -- nw4c.doesExportAllFrames = (rdoTimeRange.state == 1) nw4c.StartFrame = spnTimeStart.value nw4c.EndFrame = spnTimeEnd.value nw4c.IsLoop = chkAnimationLoop.state nw4c.AnimPrecision = case ddlAnimationPrecision.selection of ( 1: 1 2: 2 3: 5 4: 10 default: 1 ) -- nw4c.CompressNode = ddlCompressNode.selection nw4c.OptimizePrimitive = chkOptimizePrim.state -- nw4c.OptimizeMaterial = chkOptimizeMtl.state nw4c.OptimizeMaterial = (ddlOptimizeMtl.selection == 2) nw4c.DisableModelSimplification = chkDisableSimplification.state nw4c.NonUniformScale = chkNonUniformScale.state nw4c.ReservedUniformRegister = spnReserveUniform.value nw4c.VisibilityBindByName = (ddlModelBindBy.selection == 2) -- nw4c.ToleranceTrans = spnToleranceNodeT.value nw4c.ToleranceRotate = spnToleranceNodeR.value nw4c.ToleranceScale = spnToleranceNodeS.value -- nw4c.ToleranceUVTrans = spnToleranceTexT.value nw4c.ToleranceUVRotate = spnToleranceTexR.value nw4c.ToleranceUVScale = spnToleranceTexS.value nw4c.ToleranceColor = spnToleranceColor.value -- --nw4c.PrecisionTrans = spnPrecisionTrans.value --nw4c.PrecisionRotate = spnPrecisionRotate.value --nw4c.PrecisionScale = spnPrecisionScale.value -- nw4c.QuantPos = ddlQuantPosition.selection nw4c.QuantNormal = ddlQuantNormal.selection nw4c.QuantTex = ddlQuantTex.selection -- nw4c.ScaleQuality = spnScaleQuality.value nw4c.RotateQuality = spnRotateQuality.value nw4c.TransQuality = spnTransQuality.value -- nw4c.useFiguremode = chkUseFigureMode.state nw4c.IsFrameFormat = (rdoFrameFormat.state == 2) -- nw4c.UseMerge = chkMergeCmdl.state nw4c.MergeFilename = editMergeFile.text if saveToScene do nw4c.SaveSetting() ) fn checkOverwriteFiles fName = ( local nw4c = nw4cmax local owflag = false if nw4c.doesExportModel and doesFileExist(fName + ".cmdl") do ( owflag = true) if nw4c.doesExportAnimation and doesFileExist(fName + ".cskla") do ( owflag = true) if nw4c.doesExportCamera and doesFileExist(fName + ".ccam") do ( owflag = true) if nw4c.doesExportLight and doesFileExist(fName + ".clgt") do ( owflag = true) if nw4c.doesExportModelAnim and doesFileExist(fName + ".cmdla") do ( owflag = true) if nw4c.doesExportMtlAnim and doesFileExist(fName + ".cmata") do ( owflag = true) if nw4c.doesExportEnv and doesFileExist(fName + ".cenv") do ( owflag = true) if owflag == false do ( return true ) mes = fName + ".*\n" + " already exists.\nOverwrite ?" local ret = queryBox mes title:"confirm overwrite" return ret ) fn doExport = ( local fname = editFilepath.text local nw4c = nw4cMax if(fname[fname.count] != "\\") do append fname "\\" if (chkUseCS.state == false) do ( if (fname.count) <= 1 or not (doesFileExist fname) do ( messageBox "Output Folder is wrong" return undefined ) ) if (editFilename.text.count <= 0)do ( messageBox "Output File Name is wrong" return undefined ) -- time if (rdoTimeRange.state == 2) do ( if(spnTimeStart.value > spnTimeEnd.value) do ( messageBox "Time Range is wrong" return undefined ) ) if (spnReserveUniform.value + (if chkNonUniformScale.state then 6 else 3) ) > 60 do ( messageBox "Max Reserved Uniform Registers is wrong" return undefined ) saveConfig saveToScene:utils.enableSaveToScene utils.saveSettingDefault() if (chkUseCS.state == false) do ( ret = checkOverwriteFiles (fname + editFilename.text) if not ret do ( return undefined ) ) displayTempPrompt "Exporting..." 99999999 setWaitCursor() local ret = nw4cMax.doExport(rdoSelection.state == 2) setArrowCursor() removeTempPrompt() return ret ) on btnSelectPath pressed do ( local filepath = getSavePath initialDir:editFilepath.text if(filepath != undefined) do editFilepath.text = filepath ) on btnNameNode pressed do ( sel = getCurrentSelection() if sel.count > 0 do ( editFilename.text = sel[1].name ) ) on btnNameScene pressed do ( if(maxFilePath != "") do ( editFilename.text = (getFilenameFile maxFileName) ) ) on btnSelectMerge pressed do ( local filepath = getOpenFileName initialDir:editMergeFile.text types:"NW4C Model(*.cmdl)|*.cmdl|All|*.*|" if(filepath != undefined) do editMergeFile.text = filepath ) on nw4cExportRollout open do ( nw4cExportRollout.utils.loadSettingDefault() loadConfig loadFromScene:utils.enableSaveToScene ) on nw4cExportRollout close do ( --print "close nw4cExportRollout" --nw4cExportRollout.utils.saveSettingDefault() --nw4cExportRollout.utils.saveSettingConfig() ) on btnExport pressed do ( local ret = doExport() if ret == true then ( DestroyDialog nw4cExportRollout ) else if ret == false then ( messageBox "Export Error!" ) else if ret == undefined then ( -- donothing ) ) on btnApply pressed do ( local ret = doExport() if ret == false then ( messageBox "Export Error!" ) else if ret == undefined then ( -- donothing ) ) on btnClose pressed do DestroyDialog nw4cExportRollout on rdoTimeRange changed val do redrawItems() on chkMergeCmdl changed val do redrawItems() on chkUseCS changed val do redrawItems() ) -- rollout ----------------------------------------------------- -- main menu rcMenu NW4CSettingMenu ( subMenu "NW4C Settings" ( menuItem mi_scene "Save / Load Scene Settings" checked:false menuItem mi_resetScene "Reset Scene Settings" menuItem mi_deleteScene "Delete Scene Settings" separator sep1 menuItem mi_loadFile "Load Settings from c3es File" menuItem mi_saveFile "Save Settings to c3es File" ) fn updateMenu = ( mi_scene.checked = nw4cExportRollout.utils.enableSaveToScene ) on mi_scene picked do ( local val = nw4cExportRollout.utils.enableSaveToScene nw4cExportRollout.utils.enableSaveToScene = not val nw4cExportRollout.utils.saveSettingConfig() updateMenu() ) on mi_resetScene picked do ( if (queryBox "Reset NW4C Settings?") do ( nw4cmax.ResetSetting() nw4cExportRollout.loadConfig loadFromScene:false updateMenu() ) ) on mi_deleteScene picked do ( if (queryBox "Delete NW4C Settings?") do ( deleteItem rootnode.custattributes "NW4C Custom Attribute" nw4cExportRollout.loadConfig loadFromScene:false updateMenu() ) ) on mi_saveFile picked do ( --print "mi_saveFile" nw4cExportRollout.saveConfig saveToScene:false local fname = getSaveFileName caption:"Save NW4C Setting File" types:"NW4C Settings(*.c3es)|*.c3es|All|*.*|" historyCategory:"NW4C_Setting_File" if not (nw4cExportRollout.utils.saveSettingToFile fname) do ( messageBox "c3es save error" ) ) on mi_loadFile picked do ( --print "mi_loadFile" local fname = getOpenFileName caption:"Load NW4C Setting File" types:"NW4C Settings(*.c3es)|*.c3es|All|*.*|" historyCategory:"NW4C_Setting_File" if not (nw4cExportRollout.utils.loadSettingFromFile fname) do ( messageBox "c3es load error" ) nw4cExportRollout.loadConfig loadFromScene:false ) on NW4CSettingMenu open do updateMenu() on NW4CSettingMenu update do updateMenu() ) macroScript nw4cMS_ExportWithSetting category:"NW4C" ( on execute do ( CreateDialog nw4cExportRollout modal:true menu:NW4CSettingMenu ) ) macroScript ResetExportSetting category:"NW4C" ( on execute do ( local ret = queryBox "Reset Export Setting?" title:"confirm reset" if ret do ( nw4cmax.ResetSetting() nw4cmax.SaveSetting() ) ) ) macroScript nw4cMS_ExportNow category:"NW4C" ( on execute do ( local nw4c = nw4cmax local fromScene = nw4cExportRollout.utils.loadSettingDefault() if fromScene do nw4c.LoadSetting() local fname = nw4c.outFolder local nw4c = nw4cMax if(fname[fname.count] != "\\") do append fname "\\" if (nw4c.UseCreativeStudio == false) do ( if not (doesFileExist fname) do ( messageBox "Output Folder is wrong" return false ) ret = nw4cExportRollout.checkOverwriteFiles (fname + nw4c.filename) if not ret do ( return false ) ) if (nw4c.filename.count <= 0)do ( messageBox "Output File Name is wrong" return false ) fname = fname + nw4c.filename + ".cmdl" displayTempPrompt "Exporting..." 99999999 setWaitCursor() local ret = nw4c.doExport nw4c.doesExportSelected setArrowCursor() removeTempPrompt() if not ret do ( messageBox "Export error!" ) ) ) macroScript nw4cMS_SetNoCompressNode category:"NW4C" ( on execute do ( CreateDialog nw4cNodeRollout ) ) macroScript nw4cMS_SetBillboard category:"NW4C" ( on execute do ( CreateDialog nw4cBillboardRollout ) ) macroScript nw4cMS_SetMaterial category:"NW4C" ( on execute do ( CreateDialog nw4cMaterialRollout ) ) macroScript nw4cMS_SetRenderPriority category:"NW4C" ( on execute do ( CreateDialog nw4cRenderPriorityRollout ) ) macroScript nw4cMS_SetCombineGroup category:"NW4C" ( on execute do ( CreateDialog nw4cCombineRollout ) ) macroScript nw4cMS_PluginVersion category:"NW4C" ( on execute do ( local nw4c = nw4cmax if nw4c == undefined do return() mes = "NintendoWare for CTR\n" mes += "3ds Max Plugin Ver " + nw4c.GetVersionString() mes += "\n" mes += "(C)2010 Nintendo.,Ltd.\n" mes += "All rights reserved" messageBox mes title:"NW4C 3ds Max Plugin Version" ) ) fn getNw4cMenu = ( local mainMenuBar = menuman.getMainMenuBar() for i = 1 to mainMenuBar.numitems() do ( local mi = mainMenuBar.getItem i if ( (mi.getTitle()) == "NW4C" ) do ( return mi ) ) -- NW4Cメニューが未登録 local subMenu = menuMan.createMenu "NW4C" local subMenuItem = menuMan.createSubMenuItem "Test Menu" subMenu -- メイン メニュー バーの最後から 2 番目のメニュー項目のインデックスを計算します。 local subMenuIndex = mainMenuBar.numItems() - 1 -- サブメニューを最後から 2 番目のスロットに追加します。 mainMenuBar.addItem subMenuItem subMenuIndex return subMenuItem ) fn resetMenuActions mi = ( local menu = mi.getSubMenu() -- まず登録済みのサブメニューアイテムを削除 while (menu.numItems() > 0) do ( menu.removeItemByPosition 1 ) local dialogItem dialogItem = menuMan.createActionItem "nw4cMS_ExportNow" "NW4C" dialogItem.setTitle "NW4C Export" dialogItem.setUseCustomTitle true menu.addItem dialogItem -1 dialogItem = menuMan.createActionItem "nw4cMS_ExportWithSetting" "NW4C" dialogItem.setTitle "NW4C Export With Setting" dialogItem.setUseCustomTitle true menu.addItem dialogItem -1 dialogItem = menuMan.createSeparatorItem() menu.addItem dialogItem -1 dialogItem = menuMan.createActionItem "nw4cMS_SetMaterial" "NW4C" dialogItem.setTitle "NW4C Set Material Attribute" dialogItem.setUseCustomTitle true menu.addItem dialogItem -1 dialogItem = menuMan.createActionItem "nw4cMS_SetRenderPriority" "NW4C" dialogItem.setTitle "NW4C Set Render Priority" dialogItem.setUseCustomTitle true menu.addItem dialogItem -1 dialogItem = menuMan.createSeparatorItem() menu.addItem dialogItem -1 dialogItem = menuMan.createActionItem "nw4cMS_SetNoCompressNode" "NW4C" dialogItem.setTitle "NW4C Set No Compress Node" dialogItem.setUseCustomTitle true menu.addItem dialogItem -1 dialogItem = menuMan.createActionItem "nw4cMS_SetBillboard" "NW4C" dialogItem.setTitle "NW4C Set Billboard" dialogItem.setUseCustomTitle true menu.addItem dialogItem -1 dialogItem = menuMan.createActionItem "nw4cMS_SetCombineGroup" "NW4C" dialogItem.setTitle "NW4C Set Combine Group" dialogItem.setUseCustomTitle true menu.addItem dialogItem -1 dialogItem = menuMan.createSeparatorItem() menu.addItem dialogItem -1 dialogItem = menuMan.createActionItem "nw4cMS_PluginVersion" "NW4C" dialogItem.setTitle "Plugin Version" dialogItem.setUseCustomTitle true menu.addItem dialogItem -1 ) fileIn "NW4C_node.ms.inc" fileIn "NW4C_mtl.ms.inc" ---------------------------------------------- -- NW4C Main fn nw4cmain = ( -- メインメニューにNW4Cメニューを追加 local nw4cMenu = getNw4cMenu() resetMenuActions nw4cMenu -- マテリアルエディタにNW4Cメニューを追加 local nw4cMtlMenu = getNw4cMtlMenu() resetMtlMenuActions nw4cMtlMenu nw4cExportRollout.utils.loadSettingDefault() menuMan.updateMenuBar() --CreateDialog nw4cExportRollout modal:true ) -- nw4cプラグインが読み込まれていない場合は何もしない。 if nw4cmax != undefined do ( --print "NW4C menu loaded" nw4cMain() )