[fix] fix fatal div zero issue

- fix div error exception when flatten uv - scale size == 0
This commit is contained in:
yyc12345 2023-03-09 21:24:05 +08:00
parent 9c8d365ab6
commit f3663a4280

View File

@ -129,6 +129,10 @@ def _real_flatten_uv(mesh, reference_edge, scale_data: ScaleDataUnion):
or (scale_data.ReferencePoint >= allPoint)): # reference point overflow
no_processed_count += 1
continue
else:
if round(scale_data.ScaleSize, 7) == 0.0: # invalid scale size
no_processed_count += 1
continue
# ========== get correct new corrdinate system ==========
# yyc mark: