ModelTranslator: polish QR backend (docstring, gitignore out_*, progress tests)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ud18010
2026-07-22 17:32:42 +08:00
co-authored by Claude Opus 4.8
parent ac99d104c0
commit 44060ac3cb
3 changed files with 10 additions and 1 deletions
+1
View File
@@ -1,2 +1,3 @@
out/
out_*/
__pycache__/
+2 -1
View File
@@ -1,5 +1,6 @@
"""Blender 内运行:FBX 减面到指定三角面数 + UV 重展(锐边 seam 或 Smart UV Project)。
调用:blender -b --factory-startup --python bl_decimate.py -- <src.fbx> <out.fbx> <target_tris> [seam|smart]
调用:blender -b --factory-startup --python bl_decimate.py --
<src.fbx> <out.fbx> <target_tris> [unwrap:seam|smart] [overlap_tol] [reducer:collapse|quad]
"""
import os
import sys
@@ -54,6 +54,13 @@ class TestParseProgress(unittest.TestCase):
def test_running_fraction(self):
self.assertEqual(qb.parse_progress("0.5"), ("running", ""))
def test_running_positive_nonfinal(self):
# 正整数但非终态标记 2 -> running(引擎进度信号,非成功)
self.assertEqual(qb.parse_progress("1"), ("running", ""))
def test_success_float_form(self):
self.assertEqual(qb.parse_progress("2.0"), ("success", ""))
def test_running_empty(self):
self.assertEqual(qb.parse_progress(""), ("running", ""))