Stable-Dreamfusion / obj2glb.py
Linn Bedroc
Jerb
1e9f296
raw
history blame
No virus
306 Bytes
# 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')