以下是一个使用 3ds Max 的 MaxScript 语言编写的脚本示例,用于导出模型的名称、长度、高度和宽度到 CSV 表格: ```maxscript fn exportModelInfoToCSV = ( local models = selection as array local csvFile = openFile "model_info.csv" "w" for model in models do ( local name = model.name local bbox = model.boundingBox local length = bbox.max.x - bbox.min.x local height = bbox.max.y - bbox.min.y local width = bbox.max.z - bbox.min.z format "%.3f" length format "%.3f" height format "%.3f" width writeLine csvFile (name + "," + length + "," + height + "," + width) ) close csvFile ) ``` 在 3ds Max 中,选择要导出信息的模型,然后运行此脚本即可将相关信息导出到当前目录下的 `model_info.csv` 文件中。此脚本假设您已经选择了要处理的模型。 [2024-10-03 14:21:06 | AI写代码神器 | 253点数解答]