File size: 306 Bytes
1e9f296
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
# using blender, open an input.obj file, and export it as output.glb
import bpy
# import input.obj file
bpy.ops.import_scene.obj(filepath='trial/mesh/mesh.obj')

# select all
bpy.ops.object.select_all(action='SELECT')

# export output.glb file
bpy.ops.export_scene.gltf(filepath="model.glb")
print('done')