ModelTranslator: 烘焙固定 -t 1——Blender 5.0 多线程 selected-to-active 射线求交竞争崩溃(store 复现+单线程验证)

This commit is contained in:
ud18010
2026-07-20 09:41:51 +08:00
parent e78bd04ba8
commit b257fdb780
4 changed files with 67 additions and 4 deletions
+4 -1
View File
@@ -25,9 +25,12 @@ def main():
stem = output_stem(os.path.splitext(os.path.basename(args.low))[0])
outdir = os.path.join(args.out, stem)
ray = "auto" if args.ray_distance is None else str(args.ray_distance)
# -t 1Blender 5.0 的 selected-to-active 烘焙射线求交是多线程的(cast_ray_highpoly
# / TBB parallel_for),存在竞争会随机 EXCEPTION_ACCESS_VIOLATION 崩溃;单线程稳定
s = run_blender_script(blender, "bl_bake.py",
[args.high, args.low, outdir, str(args.size),
ray, str(args.samples)])
ray, str(args.samples)],
blender_args=("-t", "1"))
print("== %s(高 %d 面 / 低 %d 面,射线距离 %.4f-> %s" %
(s["stem"], s["high_tris"], s["low_tris"], s["ray_distance"], outdir))
for name, fname in s["outputs"].items():