Fix T99542: 3D print toolbox thickness check causes assertion
Recalculate normals when applying transformation in the 3D print toolbox.
This commit is contained in:
parent
7ea2e74fc4
commit
ed54c1b1c3
Notes:
blender-bot
2023-02-13 14:59:32 +01:00
Referenced by issue blender/blender#99542, Assertion at bmesh_polygon.c:961 ... BM_face_is_normal_valid(f)
|
@ -32,7 +32,13 @@ def bmesh_copy_from_object(obj, transform=True, triangulate=True, apply_modifier
|
|||
# would save ram
|
||||
|
||||
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:
|
||||
bmesh.ops.triangulate(bm, faces=bm.faces)
|
||||
|
|
Loading…
Reference in New Issue