首页 > 解决方案 > 我可以从搅拌机的控制台导出模型吗?

问题描述

我可以使用搅拌机通过控制台将模型导出为 .fbx 格式吗?

类似于:blender.exe myModel.blend --output model.fbx

标签: modelcommand-line-interfaceblenderfbx

解决方案


对于 Blender 2.90 及更高版本,此脚本将为您将场景导出为 FBX 文件。

export_fbx.py:

import bpy
import sys

print("Blender export scene in FBX Format in file "+sys.argv[-1])

# Doc can be found here: https://docs.blender.org/api/current/bpy.ops.export_scene.html
bpy.ops.export_scene.fbx(filepath=sys.argv[-1])

要使用搅拌机调用它,您可以使用以下命令:

blender <your_scene>.blend --background --python export_fbx.py -- <your_scene>.fbx

python 脚本是导出场景的最低要求。您可以将很多参数传递给该export_scene.fbx()函数,并且它不处理多个输入和输出文件。


推荐阅读