Mercurial > games > semicongine
comparison tools/blender_gltf_converter.py @ 1342:34ae5835bfa8
add: a few static helpers
| author | sam <sam@basx.dev> |
|---|---|
| date | Mon, 26 Aug 2024 18:51:25 +0700 |
| parents | 295cf32f883d |
| children | 9f3306b2ba14 |
comparison
equal
deleted
inserted
replaced
| 1341:f65f25233127 | 1342:34ae5835bfa8 |
|---|---|
| 15 if not outputfile.endswith(".glb"): | 15 if not outputfile.endswith(".glb"): |
| 16 print(f"Output file '{outputfile}' is not a *.glb file") | 16 print(f"Output file '{outputfile}' is not a *.glb file") |
| 17 quit(1) | 17 quit(1) |
| 18 | 18 |
| 19 bpy.ops.wm.open_mainfile(filepath=inputfile) | 19 bpy.ops.wm.open_mainfile(filepath=inputfile) |
| 20 bpy.ops.export_scene.gltf(filepath=outputfile[:-4], export_apply=True) | 20 bpy.ops.export_scene.gltf( |
| 21 filepath=outputfile[:-4], | |
| 22 export_apply=True, | |
| 23 export_yup=True, | |
| 24 check_existing=False, | |
| 25 export_image_format="AUTO", | |
| 26 export_format="GLB", | |
| 27 export_materials="EXPORT", | |
| 28 ) | |
| 21 | 29 |
| 22 | 30 |
| 23 if __name__ == "__main__": | 31 if __name__ == "__main__": |
| 24 runner() | 32 runner() |
