Skip to content

Commit f728acd

Browse files
committed
Catch potential UV-unwrapping exceptions
CURA-12528
1 parent 0b41d8c commit f728acd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

UM/Mesh/MeshData.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,12 @@ def calculateUnwrappedUVCoordinates(self) -> Optional[tuple[int, int]]:
418418
else:
419419
indices = numpy.array()
420420

421-
self._uvs, texture_width, texture_height = uvula.unwrap(self._vertices, indices)
421+
try:
422+
self._uvs, texture_width, texture_height = uvula.unwrap(self._vertices, indices)
423+
except:
424+
Logger.logException("e", "Error when processing mesh UV-unwrapping")
425+
texture_width = 0
426+
texture_height = 0
422427

423428
return texture_width, texture_height
424429

0 commit comments

Comments
 (0)