[Bf-blender-cvs] [432750f7cf4] master: Fix T62487: Flipped normals extruding edge loop

Campbell Barton noreply at git.blender.org
Wed Mar 13 09:22:41 CET 2019


Commit: 432750f7cf4164f9e9c1b9f4db006bd25beb0012
Author: Campbell Barton
Date:   Wed Mar 13 19:19:41 2019 +1100
Branches: master
https://developer.blender.org/rB432750f7cf4164f9e9c1b9f4db006bd25beb0012

Fix T62487: Flipped normals extruding edge loop

===================================================================

M	source/blender/bmesh/operators/bmo_dupe.c

===================================================================

diff --git a/source/blender/bmesh/operators/bmo_dupe.c b/source/blender/bmesh/operators/bmo_dupe.c
index c5a6a582b96..a5ad162b586 100644
--- a/source/blender/bmesh/operators/bmo_dupe.c
+++ b/source/blender/bmesh/operators/bmo_dupe.c
@@ -121,6 +121,12 @@ static BMEdge *bmo_edge_copy(
 	/* Mark the edge for output */
 	BMO_edge_flag_enable(bm_dst, e_dst, DUPE_NEW);
 
+	/* Take winding from previous face (if we had one),
+	 * otherwise extruding a duplicated edges gives bad normals, see: T62487. */
+	if (BM_edge_is_boundary(e_src) && (e_src->l->v == e_src->v1)) {
+		BM_edge_verts_swap(e_dst);
+	}
+
 	return e_dst;
 }



More information about the Bf-blender-cvs mailing list