当前位置:网站首页>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 230This 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.classesPress 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:FBXEXPIf 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.
边栏推荐
- Alibaba Cloud Jia Zhaohui: Cloud XR platform supports Bizhen Technology to present a virtual concert of national style sci-fi
- BEVDet4D: Exploit Temporal Cues in Multi-camera 3D Object Detection Paper Notes
- 漏洞管理计划的未来趋势
- LeetCode medium topic search of two-dimensional matrix
- 没有接班人,格力只剩“明珠精选”
- 中科院深圳先进技术院合成所赵国屏院士组2022年招聘启事
- 把相亲角搬到海外,不愧是咱爸妈
- 浙大、阿里提出DictBERT,字典描述知识增强的预训练语言模型
- Mysql—— 内连接、左连接、右连接以及全连接查询
- G1和CMS的三色标记法及漏标问题
猜你喜欢

交换机的基础知识

瑞幸「翻身」?恐言之尚早

Basic knowledge of switches

Nanodlp v2.2/v3.0光固化电路板,机械开关/光电开关/接近开关的接法和系统状态电平设置

11 + chrome advanced debugging skills, learn to direct efficiency increases by 666%

多线程下自旋锁设计基本思想

Comparison version number of middle questions in LeetCode

es6-promise对象详解

表中存在多个索引问题? - 聚集索引,回表,覆盖索引

燃炸!字节跳动成功上岸,只因刷爆LeetCode算法面试题
随机推荐
ArcMAP has a problem of -15 and cannot be accessed [Provide your license server administrator with the following information:Err-15]
ASP.NET Core依赖注入系统学习教程:ServiceDescriptor(服务注册描述类型)
47Haproxy Cluster
广东10个项目入选工信部2021年物联网示范项目名单
海外邮件发送指南(二)
Loudi Sewage Treatment Plant Laboratory Construction Management
es6-promise对象详解
Have you guys encountered this problem?MySQL 2.2 and 2.3-SNAPSHOT are like this, it seems to be
H264 码率控制
10 款更先进的开源命令行工具
金山云要飘到哪里?
mSystems | 中农汪杰组揭示影响土壤“塑料际”微生物群落的机制
Keithley DMM7510精准测量超低功耗设备各种运作模式功耗
Solve the idea that unit tests cannot use Scanner
娄底石油化工实验设计、建设规划概述
一文详解 implementation api embed
kubernetes介绍
iTextSharp 使用详解
How to cultivate the design thinking of ui designers?
LeetCode·每日一题·640.求解方程·模拟构造