ModelTranslator: bl_decimate 删 none 展开模式——随 rizom 链退役

This commit is contained in:
ud18010
2026-07-20 14:23:27 +08:00
parent 8a3e47b7cd
commit ba6f1127ea
+2 -8
View File
@@ -1,5 +1,5 @@
"""Blender 内运行:FBX 减面到指定三角面数 + UV 重展(锐边 seam 或 Smart UV Project)。 """Blender 内运行:FBX 减面到指定三角面数 + UV 重展(锐边 seam 或 Smart UV Project)。
调用:blender -b --factory-startup --python bl_decimate.py -- <src.fbx> <out.fbx> <target_tris> [seam|smart|none] 调用:blender -b --factory-startup --python bl_decimate.py -- <src.fbx> <out.fbx> <target_tris> [seam|smart]
""" """
import os import os
import sys import sys
@@ -322,13 +322,7 @@ def main():
if not within_tolerance(target, cur) and cur > target: if not within_tolerance(target, cur) and cur > target:
warnings.append("修正 %d 轮后仍超差:%d 面(目标 %d ±3%%" % (MAX_RETRY, cur, target)) warnings.append("修正 %d 轮后仍超差:%d 面(目标 %d ±3%%" % (MAX_RETRY, cur, target))
if unwrap_mode == "none": uv_info = _do_unwrap(obj, unwrap_mode, warnings)
# rizom 管线:跳过展开,UV 由后续 RizomUV 步骤生成
_clear_uv_layers(obj.data)
uv_info = {"mode": "none", "islands": 0, "fill": 0.0,
"flipped": 0.0, "overlap": None}
else:
uv_info = _do_unwrap(obj, unwrap_mode, warnings)
out_dir = os.path.dirname(os.path.abspath(out_fbx)) out_dir = os.path.dirname(os.path.abspath(out_fbx))
os.makedirs(out_dir, exist_ok=True) os.makedirs(out_dir, exist_ok=True)
# 仅导出合并后的对象;整场景导出会把 armature/empty 等非 mesh 带进 _low.fbx # 仅导出合并后的对象;整场景导出会把 armature/empty 等非 mesh 带进 _low.fbx