一些脚本

This commit is contained in:
2026-10-12 17:48:27 +08:00
parent fc89790363
commit 9d60807642
5 changed files with 995 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
# 方式一:普通终端,脚本自己找 Blender(已实测通过)
python convert_models.py --input "E:\Godot\agame\assets\FBX" --output "E:\Godot\agame\assets\GLB" --recursive --overwrite
# 方式二:直接调 Blender
"D:\Program Files\Blender Foundation\Blender 5.1\blender.exe" -b --factory-startup \
--python "E:\Godot\agame\assets\脚本\convert_models.py" -- --input ... --output ...
# 1) 原地重导出:直接替换原 GLB,但会先把原始文件备份
python convert_models.py --re-export --input "E:\Godot\agame\assets\GLB"
# 2) 重导出到新目录:原文件完全不动
python convert_models.py --re-export --input "E:\旧目录" --output "E:\新目录"
# 顺带把贴图统一压成 JPEG
python convert_models.py --re-export --input "..." --tex-format jpeg --tex-quality 85