[Bf-blender-cvs] [037aa54] master: Dyntopo: missing PBVH update collapsing an edge

Campbell Barton noreply at git.blender.org
Tue Jul 5 19:47:16 CEST 2016


Commit: 037aa544cca18cfef4fa03feac9d88e32332173b
Author: Campbell Barton
Date:   Tue Jul 5 18:45:16 2016 +1000
Branches: master
https://developer.blender.org/rB037aa544cca18cfef4fa03feac9d88e32332173b

Dyntopo: missing PBVH update collapsing an edge

PBVH-nodes attached to the vertex to be deleted were updated,
but not nodes attached to the other vertex in the edge.

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

M	source/blender/blenkernel/intern/pbvh_bmesh.c

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

diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c
index 6cbc3f2..b99e0d5 100644
--- a/source/blender/blenkernel/intern/pbvh_bmesh.c
+++ b/source/blender/blenkernel/intern/pbvh_bmesh.c
@@ -1299,6 +1299,14 @@ static void pbvh_bmesh_collapse_edge(
 		mid_v3_v3v3(v_conn->co, v_conn->co, v_del->co);
 		add_v3_v3(v_conn->no, v_del->no);
 		normalize_v3(v_conn->no);
+
+		/* update boundboxes attached to the connected vertex
+		 * note that we can often get-away without this but causes T48779 */
+		BM_LOOPS_OF_VERT_ITER_BEGIN(l, v_conn) {
+			PBVHNode *f_node = pbvh_bmesh_node_from_face(bvh, l->f);
+			f_node->flag |= PBVH_UpdateDrawBuffers | PBVH_UpdateNormals | PBVH_UpdateBB;
+		}
+		BM_LOOPS_OF_VERT_ITER_END;
 	}
 
 	/* Delete v_del */




More information about the Bf-blender-cvs mailing list