当前位置:网站首页>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.
边栏推荐
- 生成树协议STP(Spanning Tree Protocol)
- Digicert EV证书签名后出现“证书对于请求用法无效”的解决方案
- Code Casual Recording Notes_Dynamic Programming_70 Climbing Stairs
- 九宫格抽奖动效
- MYSQL误删数据恢复
- Have you guys encountered this problem?MySQL 2.2 and 2.3-SNAPSHOT are like this, it seems to be
- 虚拟机桥接模式不能上网
- 【数字IC验证进阶】SoC系统验证和IP模块验证的区别及侧重点分析
- 在web页面播放rtsp流视频(webrtc)
- 【iOS】Organization of interviews
猜你喜欢
瑞幸「翻身」?恐言之尚早
Blast!ByteDance successfully landed, only because the interview questions of LeetCode algorithm were exhausted
来看Prada大秀吗?在元宇宙里那种!
AICOCO AI Frontier Promotion (8.10)
2022年8月中国数据库排行榜:openGauss重夺榜眼,PolarDB反超人大金仓
表中存在多个索引问题? - 聚集索引,回表,覆盖索引
wirshark 常用操作及 tcp 三次握手过程实例分析
ASP.NET Core依赖注入系统学习教程:ServiceDescriptor(服务注册描述类型)
jenkins数据迁移和备份
Custom filters and interceptors implement ThreadLocal thread closure
随机推荐
es6-promise对象详解
娄底妆品实验室建设规划构思
MySQL相关问题整理
Highways「建议收藏」
娄底石油化工实验设计、建设规划概述
Deploy the project halfway through the follow-up
ArcMAP has a problem of -15 and cannot be accessed [Provide your license server administrator with the following information:Err-15]
LeetCode中等题之搜索二维矩阵
Have you guys encountered this problem?MySQL 2.2 and 2.3-SNAPSHOT are like this, it seems to be
Prada, big show?In the yuan in the universe that!
Proprietary cloud ABC Stack, the real strength!
多线程下自旋锁设计基本思想
在web页面播放rtsp流视频(webrtc)
实践为主,理论为辅!腾讯大佬MySQL高阶宝典震撼来袭!
Solve the idea that unit tests cannot use Scanner
BEVDet4D: Exploit Temporal Cues in Multi-camera 3D Object Detection Paper Notes
代码随想录笔记_动态规划_70爬楼梯
LeetCode·每日一题·640.求解方程·模拟构造
商汤自研机械臂,首款产品是AI下棋机器人:还请郭晶晶作代言
协程与任务