[Bf-blender-cvs] [8a648c1] master: Dyntopo: compare masks when collapsing

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


Commit: 8a648c191305e79a2160c170a9f481c22ddab007
Author: Campbell Barton
Date:   Tue Jul 5 16:21:58 2016 +1000
Branches: master
https://developer.blender.org/rB8a648c191305e79a2160c170a9f481c22ddab007

Dyntopo: compare masks when collapsing

Was just checking the value of the first

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

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 d936b4e..861fbee 100644
--- a/source/blender/blenkernel/intern/pbvh_bmesh.c
+++ b/source/blender/blenkernel/intern/pbvh_bmesh.c
@@ -1106,10 +1106,11 @@ static void pbvh_bmesh_collapse_edge(
         EdgeQueueContext *eq_ctx)
 {
 	BMVert *v_del, *v_conn;
-	float mask_v1 = BM_ELEM_CD_GET_FLOAT(v1, eq_ctx->cd_vert_mask_offset);
 
 	/* one of the two vertices may be masked, select the correct one for deletion */
-	if (mask_v1 < 1.0f) {
+	if (BM_ELEM_CD_GET_FLOAT(v1, eq_ctx->cd_vert_mask_offset) <
+	    BM_ELEM_CD_GET_FLOAT(v2, eq_ctx->cd_vert_mask_offset))
+	{
 		v_del = v1;
 		v_conn = v2;
 	}




More information about the Bf-blender-cvs mailing list