当前位置:网站首页>3DS MAX batch export file script MAXScript with interface
3DS MAX batch export file script MAXScript with interface
2022-08-10 13:19:00 【FireFrame】
In order to maintain distributed loading during a development process, the corresponding monolithic model resources are required. To be able to export all objects in 3DS MAX to independent files, I tried to write MAXScript by myself.
The above picture shows all the objects in the scene. I hope that the object name is the name of the export file, and it is exported to the specified folder.The exported script code is as follows:
rollout exportDlg "batch export" width:450 height:230(button 'btnExport' "Export" pos:[184,185] width:128 height:35 align:#leftbutton 'btnCancel' "Cancel" pos:[315,185] width:128 height:35 align:#leftlabel 'lbl1' "Batch export plugin" pos:[16,16] width:192 height:24 align:#lefton btnExport pressed do(dialog = DotNetObject"System.Windows.Forms.FolderBrowserDialog"dialog.Description = "Please select an export location"OpenFileResult = dialog.ShowDialog()if OpenFileResult.Equals OpenFileResult.OK then (print dialog.SelectedPathmax select all; -- select allSel = Selection as array;for i=1 to Sel.count do(select Sel[i];objName=Sel[i].name; -- get the selected name and export it separatelyexportPath=dialog.SelectedPath+"\\"+objName;-- Let's start exporting files, using: parameter can enter exporterPlugin.classes in MAXScriptListener to view all supported formatsexportfile exportPath #noPrompt selectedOnly:true using:OpenCOLLADAExporter))print "All export task completed!"))createDialog exportDlg 450 230
This script is a script with interface operation, the usage is as follows:
Copy the above script, save it with the extension "script.ms", then go back to 3DS MAX, select Scripting→Run Script... in the menu, open the corresponding .ms file just saved and run it.
After the script runs, the interface is shown below:
Click the export button to select the corresponding export path to start the export operation.
Note: The exported format is written in the .DAE format file of the OpenCOLLADAExporter exporter. If you need to export other formats, you can enter in the MAXScriptListener window:
exporterPlugin.classes
Press Enter on the keypad to run, and the corresponding supported format will be output, as shown below
Finally, select a format you want to export. For example, FBXEXP exports FBX files, and then replace the parameters after using: in the code.
Example:
exportfile exportPath #noPrompt selectedOnly:true using:FBXEXP
If the exporter after using does not exist, it seems that it can be exported successfully. The export format is the format you selected for export last time.
边栏推荐
- 浙大、阿里提出DictBERT,字典描述知识增强的预训练语言模型
- Highways「建议收藏」
- Codeforces Round #276 (Div. 1) B. Maximum Value
- bgp双平面实验 路由策略控制流量
- Crypto Gaming: The Future of Gaming
- 神经网络学习-正则化
- 专有云ABC Stack,真正的实力派!
- iTextSharp 使用详解
- Keithley DMM7510 accurate measurement of ultra-low power consumption equipment all kinds of operation mode power consumption
- M²BEV: Multi-Camera Joint 3D Detection and Segmentation with Unified Bird’s-Eye View Representation
猜你喜欢
随机推荐
动态规划之最长回文子串
娄底妆品实验室建设规划构思
LeetCode·297.二叉树的序列化与反序列化·DFS·BFS
大佬们有遇到过这个问题吗? MySQL 2.2 和 2.3-SNAPSHOT 都这样,貌似是
LeetCode简单题之合并相似的物品
什么是云流化?
查看 CUDA cudnn 版本 & 测试 cuda 和 cudnn 有效性「建议收藏」
Overseas media publicity. What problems should domestic media pay attention to?
Keithley DMM7510精准测量超低功耗设备各种运作模式功耗
AICOCO AI Frontier Promotion (8.10)
生成树协议STP(Spanning Tree Protocol)
Crypto Gaming: The Future of Gaming
Real-time data warehouse practice of Baidu user product flow and batch integration
jenkins数据迁移和备份
StarRocks on AWS Review | Data Everywhere Series Event Shenzhen Station ended successfully
A detailed explanation of implementation api embed
可视化服务编排在金融APP中的实践
MYSQL误删数据恢复
MySQL相关问题整理
MySQL索引的B+树到底有多高?