Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could I export model from console in blender?

Could i use blender to export model to .fbx format via console?

something like: blender.exe myModel.blend --output model.fbx

like image 408
Yaroslav Aloshyn Avatar asked Sep 12 '25 12:09

Yaroslav Aloshyn


1 Answers

For Blender 2.90 and up this script will export a scene as an FBX file for you.

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])

To invoke it with blender you can use the following command:

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

The python script is the minimum you can get away with for exporting your scene. There are a lot of parameters you can pass to the export_scene.fbx() function and it does not handle mutliple input and output files.

like image 92
OutOfBound Avatar answered Sep 16 '25 08:09

OutOfBound