当前位置:网站首页>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.
边栏推荐
- Is there a problem with the CURRENT_TIMESTAMP(6) function?
- Network Saboteur
- AtCoder Beginner Contest 077 D - Small Multiple
- LeetCode中等题之搜索二维矩阵
- 机器学习实战(2)——端到端的机器学习项目
- jenkins数据迁移和备份
- 神经网络学习-正则化
- 【数字IC验证进阶】SoC系统验证和IP模块验证的区别及侧重点分析
- BEVDet4D: Exploit Temporal Cues in Multi-camera 3D Object Detection 论文笔记
- CodeForces - 834C
猜你喜欢
生成树协议STP(Spanning Tree Protocol)
shell:常用小工具(sort、uniq、tr、cut)
专有云ABC Stack,真正的实力派!
来看Prada大秀吗?在元宇宙里那种!
bgp dual plane experiment routing strategy to control traffic
AICOCO AI Frontier Promotion (8.10)
「企业架构」应用架构概述
MySQL索引的B+树到底有多高?
Wirshark common operations and tcp three-way handshake process example analysis
金山云要飘到哪里?
随机推荐
Loudi Center for Disease Control and Prevention Laboratory Design Concept Description
Prada, big show?In the yuan in the universe that!
LeetCode medium topic search of two-dimensional matrix
ASP.NET Core依赖注入系统学习教程:ServiceDescriptor(服务注册描述类型)
How to cultivate the design thinking of ui designers?
Redis 定长队列的探索和实践
【iOS】Organization of interviews
Codeforces Round #276 (Div. 1) D. Kindergarten
Twikoo腾讯云函数部署转移到私有部署
交换机的基础知识
一文详解 implementation api embed
【论文+代码】PEBAL/Pixel-wise Energy-biased Abstention Learning for Anomaly Segmentation on Complex Urban Driving Scenes(复杂城市驾驶场景异常分割的像素级能量偏置弃权学习)
Merge similar items in LeetCode simple questions
Efficient and Robust 2D-to-BEV Representation Learning via Geometry-guided Kernel Transformer Paper Notes
22!Beijing Changping District notified catering service enterprises with food safety problems
AICOCO AI Frontier Promotion (8.10)
Overseas media publicity. What problems should domestic media pay attention to?
Codeforces Round #276 (Div. 1) B. Maximum Value
Basic knowledge of switches
wirshark 常用操作及 tcp 三次握手过程实例分析