Skip to content
Snippets Groups Projects
Commit ed54c1b1 authored by Campbell Barton's avatar Campbell Barton
Browse files

Fix T99542: 3D print toolbox thickness check causes assertion

Recalculate normals when applying transformation in the 3D print toolbox.
parent 7ea2e74f
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,13 @@ def bmesh_copy_from_object(obj, transform=True, triangulate=True, apply_modifier ...@@ -32,7 +32,13 @@ def bmesh_copy_from_object(obj, transform=True, triangulate=True, apply_modifier
# would save ram # would save ram
if transform: if transform:
bm.transform(obj.matrix_world) matrix = obj.matrix_world.copy()
if not matrix.is_identity:
bm.transform(matrix)
# Update normals if the matrix has no rotation.
matrix.translation.zero()
if not matrix.is_identity:
bm.normal_update()
if triangulate: if triangulate:
bmesh.ops.triangulate(bm, faces=bm.faces) bmesh.ops.triangulate(bm, faces=bm.faces)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment