ModelTranslator: QR use ExactQuadCount, authoritative QR_ENGINE override

真机验证发现 ExactQuadCount=0 自适应在高细节硬表面模型上面数暴涨
(well1500 目标2500->11500 quads)并连带 seam 展开重叠爆炸;改用 exact=True
尊重目标数后 well1500 得 5940 面/591 UV岛(优于 collapse 745)。
find_qr_engine 改为权威覆盖:QR_ENGINE 无效即 None,不再静默自动发现,
使强制回退可测、覆盖契约成立。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ud18010
2026-07-22 17:26:49 +08:00
co-authored by Claude Opus 4.8
parent 11036877fc
commit b8eb40f3e4
3 changed files with 19 additions and 4 deletions
+4 -3
View File
@@ -8,10 +8,11 @@ QR_TIMEOUT = 120.0 # 引擎轮询超时(秒)
def find_qr_engine():
"""定位 QuadRemesher 的 xremesh.exe;找不到返回 None。
顺序:QR_ENGINE 环境变量 -> 标准 addon 路径(取字典序最大目录,当前 Blender 5.x 下即最高版本)。"""
顺序:QR_ENGINE 环境变量(权威:显式设了就以它为准,无效即 None,不再自动发现)
-> 标准 addon 路径(取字典序最大目录,当前 Blender 5.x 下即最高版本)。"""
env = os.environ.get("QR_ENGINE")
if env and os.path.isfile(env):
return env
if env:
return env if os.path.isfile(env) else None
appdata = os.environ.get("APPDATA")
if not appdata:
return None